public function addIterator(iterable $iterator, PagesInterface $pages = null): void
    {
        foreach ($iterator as $filename) {
            $this->addFile($filename, $pages);
        }
    }
public function addIterator(iterable $iterator, PagesInterface $pages = null): void
    {
        foreach ($iterator as $filename) {
            $this->addFile($filename, $pages);
        }
    }
public function addIterator ( iterable $ iterator , PagesInterface $ pages = null ) : void { foreach ( $ iterator as $ filename ) { $ this -> addFile ( $ filename , $ pages ) ; } }
Add files using iterator

Note that optional pages constraint is used for every added pdf
Add files using iterator