Serialize the message to string.
@return string Serialized binary protobuf data.
2782
public function serializeToString()
    {
        $output = new CodedOutputStream($this->byteSize());
        $this->serializeToStream($output);
        return $output->getData();
    }
490183
public function serialize()
	{
		$data = $this->_data;

		$data['_is_new'] = $this->_is_new;
		$data['_is_frozen'] = $this->_is_frozen;

		return serialize($data);
	}
1066950
public function serialize()
    {
        $data = array();

        $skip = array(
            'connection',
            'platform',
            'driver'
        );

        foreach ($this as $key => $value) {
            if (in_array($key, $skip)) {
                continue;
            }
            $data[$key] = $value;
        }

        return serialize($data);
    }
1365935
public function serialize()
    {
        $data = array(
            'application' => $this->_application,
            'type'		  => $this->_type,
            'package'	  => $this->_package,
            'path'		  => $this->_path,
            'name'		  => $this->_name,
            'identifier'  => $this->_identifier,
            'basepath'    => $this->_basepath,
            'filepath'	  => $this->filepath,
            'classname'   => $this->classname,
        );

        return serialize($data);
    }
292786
public function serialize()
    {
        // @codingStandardsIgnoreStart
        unset($this->inspector, $this->___mocked);
        // @codingStandardsIgnoreEnd
        $keys = array_keys(get_object_vars($this));
        $data = [];
        foreach ($keys as $key) {
            $data[$key] = $this->$key;
        }
        return serialize($data);
    }
584792
public function serialize()
    {
        $row = array();
        $row = $this->_data->getRowData();
        $row = array_merge($row, $this->getAffectedRowData());

        return serialize(array('row' => $row, 'identifier' => (string) $this->getIdentifier()));
    }
159744
public function toString()
    {
        $headers = $this->toArray();
        $content = '';

        //Serialise the headers to a string
        foreach ($headers as $name => $value) {
            $content .= sprintf("%s %s\r\n", $name.':', $value);
        }

        return $content;
    }
1302168
public function toString()
    {
        if (empty($this->stringRepresentation)) {
            $this->stringRepresentation = sprintf('%s%s_%s', static::MESSAGE_TO_STRING_PREFIX, $this->getSourceId(), $this->getResourceId());
        }
        return $this->stringRepresentation;
    }
1033684
public function serialized(): string
    {
        return serialize(
            new self(
                $this->id,
                $this->text,
                $this->lang,
                $this->createdAt,
                $this->timestampMs,
                $this->geo,
                $this->coordinates,
                $this->places,
                $this->retweetCount,
                $this->favoriteCount,
                $this->entities,
                $this->extendedEntities,
                $this->user,
                $this->retweetedStatus
            )
        );
    }
105145
public function jsonSerialize()
    {
        $data = $this->getData();
        $data['binary'] = '';
        $data['mail'] = $this->getMail()->getId();

        return $data;
    }
175947
function toString()
    {
        $ModeXXX = implode('', $this->mode_xxx);
        if (!array_key_exists($ModeXXX, $this->mode_available))
            throw new \Exception(sprintf(
                'Invalid Open Mode Statement (%s). it`s must readable/writable or both with optional flags.'
                .' like: r+, W, rb+, ...'
                , $ModeXXX
            ));

        $mode = $this->mode_available[$ModeXXX];
        if ($this->isBinary()) {
            $base = substr($mode, 0, 1);
            // r|b|+
            $mode = $base.'b'.substr($mode, 1);
        }

        return $mode;
    }
908498
public function toString()
	{
		$lines	= array();
		$lines[]	= $this->protocol.'/'.$this->version.' '.$this->status;							//  add main protocol header
		$lines[]	= $this->headers->toString();													//  add header fields and line break
		if( strlen( $this->body ) )																	//  response body is set
			$lines[]	= $this->body;																//  add response body
		return join( "\r\n", $lines );																//  glue parts with line break and return result
	}
37026
public function serialize()
    {
        $text = array();
        foreach ($this->parameters as $k => $v) {
            $text[] = $k . ': ' . $v;
        }
        foreach ($this->variables as $k => $v) {
            $text[] = 'Set: ' . $k . '=' . $v;
        }
        return implode("\n", $text);
    }
59848
public function serialize()
    {
        return serialize(array($this->name, $this->value, $this->code, $this->line));
    }
437301
public function toString()
    {
        if (empty($this->headerSigners) && empty($this->bodySigners)) {
            return parent::toString();
        }

        $this->saveMessage();

        $this->doSign();

        $string = parent::toString();

        $this->restoreMessage();

        return $string;
    }
327811
public function serialize()
    {
        $value = $this->getParts();

        if (0 === count($value)) {
            return $this->name.'=';
        }

        if (Document::VCARD21 === $this->root->getDocumentType() && $this->noName) {
            return implode(';', $value);
        }

        return $this->name.'='.array_reduce(
            $value,
            function ($out, $item) {
                if (!is_null($out)) {
                    $out .= ',';
                }

                // If there's no special characters in the string, we'll use the simple
                // format.
                //
                // The list of special characters is defined as:
                //
                // Any character except CONTROL, DQUOTE, ";", ":", ","
                //
                // by the iCalendar spec:
                // https://tools.ietf.org/html/rfc5545#section-3.1
                //
                // And we add ^ to that because of:
                // https://tools.ietf.org/html/rfc6868
                //
                // But we've found that iCal (7.0, shipped with OSX 10.9)
                // severaly trips on + characters not being quoted, so we
                // added + as well.
                if (!preg_match('#(?: [\n":;\^,\+] )#x', $item)) {
                    return $out.$item;
                } else {
                    // Enclosing in double-quotes, and using RFC6868 for encoding any
                    // special characters
                    $out .= '"'.strtr(
                        $item,
                        [
                            '^' => '^^',
                            "\n" => '^n',
                            '"' => '^\'',
                        ]
                    ).'"';

                    return $out;
                }
            }
        );
    }
17235
public function serialize()
    {
        $str = $this->name;
        if ($this->group) {
            $str = $this->group.'.'.$this->name;
        }

        foreach ($this->parameters() as $param) {
            $str .= ';'.$param->serialize();
        }

        $str .= ':'.$this->getRawMimeDirValue();

        $str = \preg_replace(
            '/(
                (?:^.)?         # 1 additional byte in first line because of missing single space (see next line)
                .{1,74}         # max 75 bytes per line (1 byte is used for a single space added after every CRLF)
                (?![\x80-\xbf]) # prevent splitting multibyte characters
            )/x',
            "$1\r\n ",
            $str
        );

        // remove single space after last CRLF
        return \substr($str, 0, -1);
    }