コード例 #1
0
 public function recursiveIteration()
 {
     for ($it = new IOCollectionIterator($this->fixture, TRUE), $i = 0; $it->hasNext(); $i++) {
         $element = $it->next();
         $this->assertSubclass($element, 'io.collections.IOElement');
     }
     $this->assertEquals($this->total, $i);
 }
コード例 #2
0
 public function hasNextAndNext()
 {
     $results = array();
     for ($c = new IOCollectionIterator(new FtpCollection($this->dir)); $c->hasNext();) {
         $results[] = $c->next()->getURI();
     }
     $this->assertEquals(array('/.ssh/', '/.bash_history'), $results);
 }
コード例 #3
0
 /**
  * Creates a string representation of this iterator
  *
  * @return  string
  */
 public function toString()
 {
     return parent::toString() . "@{\n  " . xp::stringOf($this->filter, '  ') . "\n}";
 }