public function createSerializerFor($serialization)
    {
        $serializer = new SerializerEasyRdf($serialization);

        if (in_array($serialization, $serializer->getSupportedSerializations())) {
            return $serializer;
        } else {
            throw new \Exception(
                'No serializer for requested serialization available: '.$serialization.'. '.
                'Supported serializations are: '.implode(', ', $this->getSupportedSerializations())
            );
        }
    }
public function createSerializerFor($serialization)
    {
        $serializer = new SerializerEasyRdf($serialization);

        if (in_array($serialization, $serializer->getSupportedSerializations())) {
            return $serializer;
        } else {
            throw new \Exception(
                'No serializer for requested serialization available: '.$serialization.'. '.
                'Supported serializations are: '.implode(', ', $this->getSupportedSerializations())
            );
        }
    }
public function createSerializerFor ( $ serialization ) { $ serializer = new SerializerEasyRdf ( $ serialization ) ; if ( in_array ( $ serialization , $ serializer -> getSupportedSerializations ( ) ) ) { return $ serializer ; } else { throw new \ Exception ( 'No serializer for requested serialization available: ' . $ serialization . '. ' . 'Supported serializations are: ' . implode ( ', ' , $ this -> getSupportedSerializations ( ) ) ) ; } }
Creates a Serializer instance for a given serialization, if available.

@param string $serialization The serialization you need a serializer for. In case it is not available,
an exception will be thrown.

@return Parser suitable serializer for the requested serialization

@throws \Exception if serializer for requested serialization is not available
Creates a Serializer instance for a given serialization if available .