_outlines = $outlines; } //////////////////////////////////////////////////////////////////////// // RecursiveIterator interface methods ////////////// /** * Returns the child outline. * * @return Zend_Pdf_Outline|null */ public function current() { return current($this->_outlines); } /** * Returns current iterator key * * @return integer */ public function key() { return key($this->_outlines); } /** * Go to next child */ public function next() { return next($this->_outlines); } /** * Rewind children */ public function rewind() { return reset($this->_outlines); } /** * Check if current position is valid * * @return boolean */ public function valid() { return current($this->_outlines) !== false; } /** * Returns the child outline. * * @return Zend_Pdf_Outline|null */ public function getChildren() { return current($this->_outlines); } /** * Implements RecursiveIterator interface. * * @return bool whether container has any pages */ public function hasChildren() { return count($this->_outlines) > 0; } //////////////////////////////////////////////////////////////////////// // Countable interface methods ////////////// /** * count() * * @return int */ public function count() { return count($this->_outlines); } }