private function serialize(EntityMetadata $metadata)
    {
        switch ($this->serializer) {
            case self::SERIALIZER_PHP:
                return serialize($metadata);
            case self::SERIALIZER_IGBINARY:
                return igbinary_serialize($metadata);
            default:
                throw new RuntimeException('Unable to handle serialization of the metadata object');
        }
    }
private function serialize(EntityMetadata $metadata)
    {
        switch ($this->serializer) {
            case self::SERIALIZER_PHP:
                return serialize($metadata);
            case self::SERIALIZER_IGBINARY:
                return igbinary_serialize($metadata);
            default:
                throw new RuntimeException('Unable to handle serialization of the metadata object');
        }
    }
private function serialize ( EntityMetadata $ metadata ) { switch ( $ this -> serializer ) { case self :: SERIALIZER_PHP : return serialize ( $ metadata ) ; case self :: SERIALIZER_IGBINARY : return igbinary_serialize ( $ metadata ) ; default : throw new RuntimeException ( 'Unable to handle serialization of the metadata object' ) ; } }
Serializes the metadata object based on the selected serializer.

@param   EntityMetadata  $metadata
@return  string
@throws  RuntimeException
Serializes the metadata object based on the selected serializer .