protected function insertMetadata($content, $entryIdentifier, array $tags, $lifetime)
    {
        if (!is_string($content)) {
            throw new InvalidDataTypeException('Given data is of type "' . gettype($content) . '", but a string is expected for string cache.', 1433155737);
        }
        $metadata = array(
            'identifier' => $entryIdentifier,
            'tags' => $tags,
            'lifetime' => $lifetime
        );
        $metadataJson = json_encode($metadata);
        $this->metadata[$entryIdentifier] = $metadata;
        return $metadataJson . self::SEPARATOR . $content;
    }
protected function insertMetadata($content, $entryIdentifier, array $tags, $lifetime)
    {
        if (!is_string($content)) {
            throw new InvalidDataTypeException('Given data is of type "' . gettype($content) . '", but a string is expected for string cache.', 1433155737);
        }
        $metadata = array(
            'identifier' => $entryIdentifier,
            'tags' => $tags,
            'lifetime' => $lifetime
        );
        $metadataJson = json_encode($metadata);
        $this->metadata[$entryIdentifier] = $metadata;
        return $metadataJson . self::SEPARATOR . $content;
    }
protected function insertMetadata ( $ content , $ entryIdentifier , array $ tags , $ lifetime ) { if ( ! is_string ( $ content ) ) { throw new InvalidDataTypeException ( 'Given data is of type "' . gettype ( $ content ) . '", but a string is expected for string cache.' , 1433155737 ) ; } $ metadata = array ( 'identifier' => $ entryIdentifier , 'tags' => $ tags , 'lifetime' => $ lifetime ) ; $ metadataJson = json_encode ( $ metadata ) ; $ this -> metadata [ $ entryIdentifier ] = $ metadata ; return $ metadataJson . self :: SEPARATOR . $ content ; }
Insert metadata into the content

@param string $content
@param string $entryIdentifier The identifier metadata
@param array $tags The tags metadata
@param integer $lifetime The lifetime metadata
@return string The content including the serialized metadata
@throws InvalidDataTypeException
Insert metadata into the content