_callback = $callback; return; } /** * Return the current element. * * @return mixed */ public function current() { $handle = $this->_callback; return $this->_current = $handle($this->_key); } /** * Return the key of the current element. * * @return mixed */ public function key() { return $this->_key; } /** * Move forward to next element. * * @return void */ public function next() { ++$this->_key; return; } /** * Rewind the iterator to the first element. * * @return void */ public function rewind() { $this->_key = 0; $this->_current = null; return; } /** * Check if current position is valid. * * @return bool */ public function valid() { return true; } }