src/Micrometa/Ports/Parser.php
protected function extractItems(\DOMDocument $dom, \Generator $parsers)
    {
        $items     = [];
        $extractor = new ExtractorService();
        foreach ($parsers as $parser) {
            $results = $extractor->extract($dom, $parser);
            $items   = array_merge($items, ItemFactory::createFromApplicationItems($results->getItems()));
        }

        return $items;
    }
protected function extractItems(\DOMDocument $dom, \Generator $parsers)
    {
        $items     = [];
        $extractor = new ExtractorService();
        foreach ($parsers as $parser) {
            $results = $extractor->extract($dom, $parser);
            $items   = array_merge($items, ItemFactory::createFromApplicationItems($results->getItems()));
        }

        return $items;
    }
protected function extractItems ( \ DOMDocument $ dom , \ Generator $ parsers ) { $ items = [ ] ; $ extractor = new ExtractorService ( ) ; foreach ( $ parsers as $ parser ) { $ results = $ extractor -> extract ( $ dom , $ parser ) ; $ items = array_merge ( $ items , ItemFactory :: createFromApplicationItems ( $ results -> getItems ( ) ) ) ; } return $ items ; }
Extract all items from a DOM using particular parsers

@param \DOMDocument $dom   DOM document
@param \Generator $parsers Parsers

@return ItemInterface[] Items
Extract all items from a DOM using particular parsers