number) . ' of ' . current($this->color); } /** * Return the current key */ public function key() { return current($this->color) . current($this->number); } /** * Go to the next item in the collection */ public function next() { if (false === next($this->number)) { if (false !== next($this->color)) { reset($this->number); } } } /** * Go to the first item in the collection */ public function rewind() { reset($this->color); reset($this->number); } /** * Is the current position a valid item (true) * or do we reach the end (false) ? */ public function valid() { return current($this->number) || current($this->color); } }