public function createParserFor($serialization)
    {
        if (!in_array($serialization, $this->getSupportedSerializations())) {
            throw new \Exception(
                'Requested serialization '.$serialization.' is not available in: '.
                implode(', ', $this->getSupportedSerializations())
            );
        }

        return new ParserHardf(
            $this->nodeFactory,
            $this->statementFactory,
            $this->statementIteratorFactory,
            $this->RdfHelpers,
            $serialization
        );
    }
public function createParserFor($serialization)
    {
        if (!in_array($serialization, $this->getSupportedSerializations())) {
            throw new \Exception(
                'Requested serialization '.$serialization.' is not available in: '.
                implode(', ', $this->getSupportedSerializations())
            );
        }

        return new ParserHardf(
            $this->nodeFactory,
            $this->statementFactory,
            $this->statementIteratorFactory,
            $this->RdfHelpers,
            $serialization
        );
    }
public function createParserFor ( $ serialization ) { if ( ! in_array ( $ serialization , $ this -> getSupportedSerializations ( ) ) ) { throw new \ Exception ( 'Requested serialization ' . $ serialization . ' is not available in: ' . implode ( ', ' , $ this -> getSupportedSerializations ( ) ) ) ; } return new ParserHardf ( $ this -> nodeFactory , $ this -> statementFactory , $ this -> statementIteratorFactory , $ this -> RdfHelpers , $ serialization ) ; }
Creates a Parser instance for a given serialization, if available.

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

@return Parser suitable parser for the requested serialization

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