next() public method

Implements Iterator
public next ( )
 public function testIteration()
 {
     $listing = array('a', 'b', 'c');
     $iterator = new ArrayBuffer($listing);
     $i = 0;
     while ($iterator->valid()) {
         $this->assertEquals($listing[$i], $iterator->current());
         $this->assertEquals($i, $iterator->key());
         $i++;
         $iterator->next();
     }
     $this->assertEquals(count($listing), $i);
     $iterator->rewind();
     $this->assertEquals(reset($listing), $iterator->current());
     $this->assertEquals(key($listing), $iterator->key());
 }
 /**
  * streamWrapper::dir_readdir — Read entry from directory handle
  *
  * @return  string|false    Should return string representing the next filename, or FALSE if there is no next file.
  */
 public function dir_readdir()
 {
     $file = $this->dirBuffer->current();
     $this->dirBuffer->next();
     return $file;
 }