Turns the object back into a serialized blob.

@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;
                }
            }
        );
    }
1329347
public function serialize()
    {
        $debugOutputResource = null;
        if (is_resource($this->debugOutputResource)) {
            $metadata = stream_get_meta_data($this->debugOutputResource);
            $debugOutputResource = [
                'uri' => $metadata['uri'],
                'mode' => $metadata['mode']
            ];
        }

        return serialize([
            $this->messageKey,
            $this->batchEnabled,
            $this->metadataProvider,
            $this->debugOutput,
            $this->clientConfig,
            $this->batchMethod,
            $this->logName,
            $debugOutputResource
        ]);
    }
1111391
public function to_bin()
   {
         $out = "";
      for ($i=0; $i<$this->dataLength($this->data); $i++)
         $out = sprintf("%08b",$this->data[$i]).$out;
      return $out;      
   }
993417
public function serialize()
    {
        return serialize(array($this->message, $this->code, $this->file, $this->line));
    }
337131
public function serialize()
    {
        $tz = $this->getTimezone();
        if ($tz && in_array($tz->getName(), timezone_identifiers_list())) {
            $strTz = $tz->getName();
            $strDate = parent::format('Y-m-d H:i:s');
        } else {
            $strTz = null;
            $strDate = parent::format(QDateTime::ISO8601);
        }
        return serialize([
            1, // version number of serialized data, in case format changes
            $this->blnDateNull,
            $this->blnTimeNull,
            $strDate,
            $strTz
        ]);
    }
363557
public function serialize() {

        return serialize( (object) [
            'classname' => $this->classname,
            'type' => $this->type,
            'service' => $this->service,
            'parameters' => $this->parameters,
            'request' => $this->request,
            'query' => $this->query
        ]);

    }
494028
public function getRawContent()
    {
        if ($this->size == 0) {
            return '';
        }

        if ($this->encoding === 'base64') {
            $raw = base64_decode($this->content, true);
            if ($raw === false) {
                throw new \RuntimeException('Failed to decode content');
            }

            return $raw;
        }

        throw new \RuntimeException('Unrecognised blob encoding: ' . $this->encoding);
    }
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()));
    }
748350
public function serialize()
    {
        return serialize(array(
            'credentials'   => $this->credentials,
            'loginResult'   => $this->loginResult,
            'debug'         => $this->debug,
            'lastLoginTime' => $this->lastLoginTime,
            '__parentData'  => parent::serialize()
        ));
    }
965431
public function serialize()
	{
		$xmlString = sprintf(
			'<%s %s>%s</%1$s>',
			$this->_getRootNodeName(),
			$this->_serializeRootAttributes(),
			$this->_serializeContents()
		);
		$canonicalXml = $this->_helper->getPayloadAsDoc($xmlString)->saveXML();
		$this->_schemaValidate($canonicalXml);
		return $canonicalXml;
	}
1014580
public function serialize()
    {
        return base64_encode(json_encode([
            'sessionName' => $this->session->name(),
            'transactionId' => $this->transactionId,
            'readTimestamp' => $this->readTimestamp->formatAsString()
        ]));
    }
1017672
public function serialize()
    {
        $result = [
            'code' => $this->getCode(),
            'message' => $this->getMessage(),
            'errors' => $this->getErrors()
        ];

        $result['data'] = $this->getVariables();

        if ($result['data'] instanceof Traversable) {
            $result['data'] = ArrayUtils::iteratorToArray($result['data']);
        }

        if (null !== $this->jsonpCallback) {
            return $this->jsonpCallback . '(' . Json::encode($result) . ');';
        }

        return Json::encode($result);
    }
227211
public function serialize()
    {
        return serialize([
            $this->path,
            $this->schemes,
            $this->methods,
            $this->defaults,
            $this->constraints,
            $this->parts,
            $this->compiled,
        ]);
    }
60911
public function serialize()
    {
        $result = array();
        foreach ($this->getKeys() as $k => $v) {
            $result[] = $k . ': ' . $v;
        }
        foreach ($this->getVariables() as $k => $v) {
            if (is_array($v)) {
                foreach ($v as $singleValue) {
                    $result[] = $this->serializeVariable($k, $singleValue);
                }
            } else {
                $result[] = $this->serializeVariable($k, $v);
            }
        }
        $mStr = $this->finishMessage(implode(self::EOL, $result));
        return $mStr;
    }
891730
public function serialize()
    {
        return serialize(
            [
                $this->outFilePath,
                $this->width,
                $this->height,
                $this->frameRate,
                $this->loopCount,
                $this->gifData,
                $this->frames,
                $this->counter,
            ]
        );
    }
1212045
protected function serialize() {
    if (!$this->isModified() && ($cacheFile = $this->getSerializeFilename($this->addedFiles))) {
      if (self::$logger->isDebugEnabled()) {
        self::$logger->debug("Serialize configuration: ".join(',', $this->addedFiles)." to file: ".$cacheFile);
      }
      $this->fileUtil->mkdirRec(dirname($cacheFile));
      if ($fh = @fopen($cacheFile, "w")) {
        if (@fwrite($fh, serialize(array_filter(get_object_vars($this), function($value, $name) {
          return $name != 'comments'; // don't store comments
        }, ARRAY_FILTER_USE_BOTH)))) {
          @fclose($fh);
        }
      }
    }
  }
1068583
public function serialize()
    {
        $data = array();

        $private_properties = array(
            'row_wrapper_class',
            'index_field',
            'objects',
            'objects_by_index',
            'options'
        );

        foreach ($private_properties as $property) {
            $data[$property] = $this->$property;
        }

        return serialize($data);
    }