Source of file TokenFileIterator.php
Size: 1,065 Bytes - Last Modified: 2014-08-13T00:46:38+02:00
/home/theseer/storage/php/phpdox/src/generator/project/TokenFileIterator.php
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 | <?php namespace TheSeer\phpDox\Generator { use TheSeer\phpDox\FileInfo; class TokenFileIterator implements \Iterator { /** * @var \DOMNodeList */ private $nodeList; public function __construct(\DOMNodeList $nodeList) { $this->nodeList = $nodeList; } /** * @var int */ private $pos = 0; /** * @return TokenFile */ public function current() { $item = $this->nodeList->item($this->pos); //var_dump($item); $path = dirname($item->ownerDocument->documentURI) . '/' . $item->getAttribute('xml'); return new TokenFile(new FileInfo($path)); } public function next() { $this->pos++; } public function key() { return $this->pos; } public function valid() { return $this->nodeList->length > $this->pos; } public function rewind() { $this->pos = 0; } } } |