1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- <?php namespace Gogs\Lib;
- /**
- * Interface to store one or more elements in array
- * providing an iterator interface.
- */
- interface ArrayIterator {
- /**
- * Get current element in collection.
- * @return
- */
- public function current();
- /**
- * Get next element in collection.
- *
- * @return mixed
- */
- public function next();
- /**
- * Return previous element in collection.
- * @return mixed
- */
- public function prev();
- /**
- * Reset collection (set array to head).
- *
- * @return mixed Returns first elements value.
- */
- public function reset();
-
- /**
- * Return collection size.
- *
- * @return int
- */
- public function len();
-
- /**
- * Return the whole colection.
- *
- * @return array
- */
- public function all();
-
- /**
- * Get element by index key.
- *
- * @param mixed $idx Index key.
- * @return mixed
- */
- public function by_key($idx);
- }
|