コード例 #1
0
 /**
  * Advances the iterator pointer to the next element
  *
  * @return void
  */
 public function next()
 {
     $this->_index++;
     if (!$this->_finished) {
         parent::next();
     }
 }
コード例 #2
0
 /**
  * Returns the value returned by the callback after passing the current value in
  * the iteration
  *
  * @return mixed
  */
 public function current()
 {
     $callback = $this->_callback;
     return $callback(parent::current(), $this->key(), $this->_innerIterator);
 }