マルチトン全体のシリアライザ

@return	string	シリアル化されたマルチトン
500478
public static function serialize () {
		$data = [];
		foreach (static::$multitonInstances as $name => $instance) {
			$data[$name] = serialize($instance);
		}
		return serialize($data);
	}
1274995
public function getPath(): string
    {

        $query = http_build_query(
            [
                'q'      => $this->query,
                'show'   => ($this->page !== 1) ? 50 * ($this->page - 1) : null,
                'letter' => $this->char,
                'type'   => $this->type,
                'score'  => $this->score,
                'status' => $this->status,
                'p'      => $this->producer,
                'r'      => $this->rated,
                'sd'     => $this->startDate[0],
                'sm'     => $this->startDate[1],
                'sy'     => $this->startDate[2],
                'ed'     => $this->endDate[0],
                'em'     => $this->endDate[1],
                'ey'     => $this->endDate[2],
                'gx'     => (int)$this->genreExclude,
                'o'      => $this->orderBy,
                'w'      => $this->sort
            ]
        );

        // Add genre[]=
        if (!empty($this->genre)) {
            foreach ($this->genre as $genre) {
                $query .= '&genre[]='.$genre;
            }
        }

        return sprintf(
            'https://myanimelist.net/anime.php?%s&c[]=a&c[]=b&c[]=c&c[]=f&c[]=d&c[]=e&c[]=g',
            $query
        );
    }
263657
public function getSentMIMEMessage()
    {
        return rtrim($this->MIMEHeader . $this->mailHeader, "\n\r") . self::CRLF . self::CRLF . $this->MIMEBody;
    }
1351529
protected function getControllerContent()
    {
        if (!$stub = $this->getControllerStub()) {
            return '';
        }

        $sectionSegmentsStudly = $this->sectionSegmentsStudly;

        $name      = array_pop($sectionSegmentsStudly).'Controller';
        $namespace = $this->appNs.'\Http\Controllers';
        $requestNs = $this->appNs.'\Http\Requests\\'.implode('\\', $this->sectionSegmentsStudly);
        $listingClass = $this->appNs.'\Listings\\'.implode('\\', $this->sectionSegmentsStudly).'Listing';

        if ($sectionSegmentsStudly) {
            $namespace .= '\\'.implode('\\', $sectionSegmentsStudly);
        }

        return strtr($stub, array_merge($this->getCommonReplacements(), [
            '{{namespace}}'        => $namespace,
            '{{name}}'             => $name,
            '{{requestNamespace}}' => $requestNs,
            '{{listingClass}}'     => $listingClass,
        ]));
    }
78915
public function ToString()
	{
		$sb = array();
		if ( $this->Prefix != "" )
		{
			$sb[] = $this->Prefix;
			$sb[] = ':';
		}
		$sb[] = $this->LocalName;
		return implode( "", $sb );
	}
225956
public function getAsString(): string
    {
        $text = $this->source->getAsString();

        $stripAll = new StripAllFilter();
        $htmlFilter = new HtmlFilter();

        /* Removing CDATA tags */
        $text = preg_replace_callback(
            '#<!\[CDATA\[(.*?)\]\]>#ums',
            function ($match) use ($htmlFilter) {
                $string = $htmlFilter->filter($match[1]);

                //      <![CDATA[               ]]
                return '         ' . $string . '  ';
            },
            $text
        );

        /* Processing bottom level tags */
        $text = preg_replace_callback(
            '#(<(\w+)(\s[^>]*?)?>)([^<>]*)(</\w+\s*>)#um',
            function ($match) use ($stripAll) {
                if (strtolower($match[2]) === 'target') {
                    $replace = $stripAll->filter($match[1]) . $match[4]
                        . $stripAll->filter($match[5]);
                } else {
                    $replace = $stripAll->filter($match[0]);
                }

                return $replace;
            },
            $text
        );

        /* Other replacements */
        foreach ($this->filters as $pattern => $filter) {
            if (null === $filter) {
                $filter = $stripAll;
            }
            $text = preg_replace_callback(
                $pattern,
                function ($match) use ($filter) {
                    return $filter->filter($match[0]);
                },
                $text
            );
        }

        return $text;
    }
1035866
public function getPanel()
    {
        if (!$this->_profilers) {
            return '';
        }

        $html = '<h4>Database queries</h4>';
        
        foreach ($this->_profilers as $name => $profiler) {
            $html .= '<h4>Connection: '.$name.'</h4>';
            
            if (count($profiler) > 0 ) {
                $html .= '<ol>';  
                  
                foreach ($profiler as $event) {
                    if (in_array($event->getCode(), $this->getQueryEventCodes())) {
                        $query = htmlspecialchars($event->getQuery());
                        $time = round($event->getElapsedSecs() * 1000, 2);
                        $html .= '<li>' . $query . '<p><strong>Time: </strong>' . $time . ' ms</p></li>';
                    }
                }
                
                $html .= '</ol>';
            }
        }

        return $html;
    }
916869
public function toPEMString(): string
    {
        return implode("\n",
            array_map(
                function (Certificate $cert) {
                    return $cert->toPEM()->string();
                }, $this->_certs));
    }
1362309
public function toString() : string
   {

      if ( empty( $this->_subDomainName ) )
      {

         if ( null === $this->_sld )
         {
            return '';
         }

         return $this->_sld->toString();

      }

      if ( null === $this->_sld )
      {
         return $this->_subDomainName;
      }

      return $this->_subDomainName . '.' . $this->_sld->toString();

   }
33690
public function getFullUrl()
    {
        $isSecure = $this->isSecure();
        $srvProtocol = strtolower($this->server->get('SERVER_PROTOCOL'));
        $protocol = substr($srvProtocol, 0, strpos($srvProtocol, '/')).(($isSecure) ? 's' : '');
        $port = $this->getPort();
        $port = ((!$isSecure && $port != '80') || ($isSecure && $port != '443')) ? ":$port" : '';

        return $protocol.'://'.$this->getHost().$port.$this->server->get('REQUEST_URI');
    }
1208282
public function getMediumUrl() {

		if( $this->changed ) {

			return Yii::$app->fileManager->uploadUrl . '/' . CoreProperties::DIR_TEMP . $this->directory . "/" . $this->name . "-medium." . $this->extension;
		}
		else if( $this->id > 0 ) {

			return Yii::$app->fileManager->uploadUrl . '/' . $this->medium;
		}

		return "";
	}
165403
public function assemble() {
		$scripts = [];
		
		if (! empty($this->resources)) {
			foreach ($this->resources as $resource) {
				$scripts[] = $this->renderTag($resource);
			}
		}
		
		if (! empty($this->packages)) {
			foreach ($this->packages as $package) {
				$package->assemble();
				$scripts[] = $this->renderTag($package);
			}
		}
		
		if (empty($scripts)) {
			return '';
		}
		
		return implode(PHP_EOL, $scripts);
	}
211694
public function asHeader()
    {
        $header = urlencode($this->name).'='.urlencode((string) $this->value);
        
        if($this->domain !== null) {
            $header.= '; domain='.$this->domain;
        }
        
        if($this->path !== null) {
            $header.= '; path='.$this->path;
        }
        
        if($this->expires !== null) {
            $header.= '; expires=' . gmdate('D, d-M-Y H:i:s e', $this->expires);
        }
        
        if($this->secure) {
            $header.= '; secure';
        }
        
        if($this->httpOnly) {
            $header.= '; HttpOnly';
        }
        
        return $header;
    }
959359
protected function getConfigFormat()
    {
        $conf = $this->username;
        if (!empty($this->server)) {
            $conf .= ';'.$this->server;
        }

        $conf .= ' '.$this->password;

        if (!empty($this->alias)) {
            $conf .= ' '.$this->alias;
        }

        return $conf;
    }
1113743
public function toString()
    {
        $driver = $this->getDriver();
        $prefix = $driver->getTablePrefix();
        $query  = 'DELETE';

        if($this->table && $this->join) {
            $query .= ' '.$driver->quoteIdentifier(!is_numeric(key($this->table)) ? key($this->table) : current($this->table));
        }

        if($this->table) {
            $query .= ' FROM '.$driver->quoteIdentifier($prefix.current($this->table).(!is_numeric(key($this->table)) ? ' AS '.key($this->table) : ''));
        }

        if($this->join)
        {
            $joins = array();
            foreach($this->join as $alias => $join)
            {
                $tmp = '';

                if($join['type']) {
                    $tmp .= ' '.$join['type'];
                }

                if($join['table'] instanceof DatabaseQuerySelect) {
                    $tmp .= ' JOIN ('.$join['table'].')'.(is_string($alias) ? ' AS '.$driver->quoteIdentifier($alias) : '');
                } else {
                    $tmp .= ' JOIN '.$driver->quoteIdentifier($prefix.$join['table'].(is_string($alias) ? ' AS '.$alias : ''));
                }

                if($join['condition']) {
                    $tmp .= ' ON ('.$driver->quoteIdentifier($join['condition']).')';
                }

                $joins[] = $tmp;
            }

            $query .= implode('', $joins);
        }

        if($this->where)
        {
            $query .= ' WHERE';

            foreach($this->where as $where)
            {
                if(!empty($where['combination'])) {
                    $query .= ' '.$where['combination'];
                }

                $query .= ' '.$driver->quoteIdentifier($where['condition']);
            }
        }

        if($this->order)
        {
            $query .= ' ORDER BY ';

            $list = array();
            foreach($this->order as $order) {
                $list[] = $driver->quoteIdentifier($order['column']).' '.$order['direction'];
            }

            $query .= implode(' , ', $list);
        }

        if($this->limit) {
            $query .= ' LIMIT '.$this->offset.' , '.$this->limit;
        }

        if($this->_parameters) {
            $query = $this->_replaceParams($query);
        }

        return $query;
    }
236423
public function asString() : string
    {
        $fractionDigits = $this->currency->getDefaultFractionDigits();

        $wholePart = substr((string)$this->amount, 0, -$fractionDigits) ?: '0';

        $fractionalPart = str_pad(substr((string)$this->amount, -$fractionDigits), $fractionDigits, '0', STR_PAD_RIGHT);

        return $wholePart . '.' . $fractionalPart;
    }
1282414
public function toString()
    {
        if ($this->isEmpty()) {
            return '';
        }

        $traitNames = $this->toArray();
        $tabulationFormatted = $this->getTabulationFormatted();

        $compositionMethods = ';' . PHP_EOL;
        if (!$this->getMethods()->isEmpty()) {
            $compositionMethods = ' ' . $this->getMethods()->toString();
        }

        return $tabulationFormatted . 'use ' . implode(', ', $traitNames) . $compositionMethods;
    }