public function parse(Document $document, FeedInterface $feed) : FeedInterface
    {
        if (!$this->standard->canHandle($document)) {
            throw new UnsupportedFormatException('this is not a supported format');
        }

        $this->checkBodyStructure($document, $this->standard->getMandatoryFields());
        $this->parseContent($document, $feed);

        return $feed;
    }
public function parse(Document $document, FeedInterface $feed) : FeedInterface
    {
        if (!$this->standard->canHandle($document)) {
            throw new UnsupportedFormatException('this is not a supported format');
        }

        $this->checkBodyStructure($document, $this->standard->getMandatoryFields());
        $this->parseContent($document, $feed);

        return $feed;
    }
public function parse ( Document $ document , FeedInterface $ feed ) : FeedInterface { if ( ! $ this -> standard -> canHandle ( $ document ) ) { throw new UnsupportedFormatException ( 'this is not a supported format' ) ; } $ this -> checkBodyStructure ( $ document , $ this -> standard -> getMandatoryFields ( ) ) ; $ this -> parseContent ( $ document , $ feed ) ; return $ feed ; }
Tries to parse the document

@param Document $document
@param FeedInterface $feed
@return \FeedIo\FeedInterface
@throws \FeedIo\Parser\UnsupportedFormatException
Tries to parse the document