*prechod na novsiu verziu ZF
[sport-group.git] / library / Zend / Pdf / RecursivelyIteratableObjectsContainer.php
blobff55993d5b8fc28b5af2a8fc103542d9bb759680
1 <?php
2 /**
3 * Zend Framework
5 * LICENSE
7 * This source file is subject to the new BSD license that is bundled
8 * with this package in the file LICENSE.txt.
9 * It is also available through the world-wide-web at this URL:
10 * http://framework.zend.com/license/new-bsd
11 * If you did not receive a copy of the license and are unable to
12 * obtain it through the world-wide-web, please send an email
13 * to license@zend.com so we can send you a copy immediately.
15 * @category Zend
16 * @package Zend_Pdf
17 * @subpackage Actions
18 * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
19 * @license http://framework.zend.com/license/new-bsd New BSD License
20 * @version $Id$
23 /**
24 * Iteratable objects container
26 * @package Zend_Pdf
27 * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
28 * @license http://framework.zend.com/license/new-bsd New BSD License
30 class Zend_Pdf_RecursivelyIteratableObjectsContainer implements RecursiveIterator, Countable
32 protected $_objects = array();
34 public function __construct(array $objects) { $this->_objects = $objects; }
36 public function current() { return current($this->_objects); }
37 public function key() { return key($this->_objects); }
38 public function next() { return next($this->_objects); }
39 public function rewind() { return reset($this->_objects); }
40 public function valid() { return current($this->_objects) !== false; }
41 public function getChildren() { return current($this->_objects); }
42 public function hasChildren() { return count($this->_objects) > 0; }
44 public function count() { return count($this->_objects); }