| 1 | <?php |
||
| 14 | abstract class Stencil_Abstract_Hierarchy implements Iterator { |
||
| 15 | /** |
||
| 16 | * Current index |
||
| 17 | * |
||
| 18 | * @var int |
||
| 19 | */ |
||
| 20 | protected $index = 0; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * The options for this item |
||
| 24 | * |
||
| 25 | * @var array |
||
| 26 | */ |
||
| 27 | protected $options = array(); |
||
| 28 | |||
| 29 | /** |
||
| 30 | * Set the options |
||
| 31 | * |
||
| 32 | * @param array $options Set the options available. |
||
| 33 | */ |
||
| 34 | protected function set_options( $options ) { |
||
| 37 | |||
| 38 | /** |
||
| 39 | * Return the current element |
||
| 40 | * @link http://php.net/manual/en/iterator.current.php |
||
| 41 | * @return mixed Can return any type. |
||
| 42 | * @since 5.0.0 |
||
| 43 | */ |
||
| 44 | public function current() { |
||
| 47 | |||
| 48 | /** |
||
| 49 | * Move forward to next element |
||
| 50 | */ |
||
| 51 | public function next() { |
||
| 54 | |||
| 55 | /** |
||
| 56 | * Return the key of the current element |
||
| 57 | * |
||
| 58 | * @return mixed|null scalar on success, null on failure. |
||
| 59 | */ |
||
| 60 | public function key() { |
||
| 63 | |||
| 64 | /** |
||
| 65 | * Checks if current position is valid |
||
| 66 | * |
||
| 67 | * Returns true on success or false on failure. |
||
| 68 | */ |
||
| 69 | public function valid() { |
||
| 72 | |||
| 73 | /** |
||
| 74 | * Rewind the Iterator to the first element |
||
| 75 | */ |
||
| 76 | public function rewind() { |
||
| 79 | } |
||
| 80 |