summaryrefslogtreecommitdiff
path: root/framework/Collections/TList.php
diff options
context:
space:
mode:
authorFabio Bas <ctrlaltca@gmail.com>2016-03-09 11:26:56 +0100
committerFabio Bas <ctrlaltca@gmail.com>2016-03-29 17:40:16 +0200
commit64d458715b1018b039d1bafca3cf9dcec511074f (patch)
treeddb39d99f587a07cdaebc8b1c323c59889a71346 /framework/Collections/TList.php
parentc0627c7a5e3bd343d0b33bf0b3a37639c5f33885 (diff)
Removed deprecated code
Diffstat (limited to 'framework/Collections/TList.php')
-rw-r--r--framework/Collections/TList.php73
1 files changed, 1 insertions, 72 deletions
diff --git a/framework/Collections/TList.php b/framework/Collections/TList.php
index 14fc1c03..6e9e16f9 100644
--- a/framework/Collections/TList.php
+++ b/framework/Collections/TList.php
@@ -406,78 +406,7 @@ class TList extends TComponent implements IteratorAggregate,ArrayAccess,Countabl
* @package System.Collections
* @since 3.0
*/
-class TListIterator implements Iterator
+class TListIterator extends ArrayIterator
{
- /**
- * @var array the data to be iterated through
- */
- private $_d;
- /**
- * @var integer index of the current item
- */
- private $_i;
- /**
- * @var integer count of the data items
- */
- private $_c;
-
- /**
- * Constructor.
- * @param array the data to be iterated through
- */
- public function __construct(&$data)
- {
- $this->_d=&$data;
- $this->_i=0;
- $this->_c=count($this->_d);
- }
-
- /**
- * Rewinds internal array pointer.
- * This method is required by the interface Iterator.
- */
- public function rewind()
- {
- $this->_i=0;
- }
-
- /**
- * Returns the key of the current array item.
- * This method is required by the interface Iterator.
- * @return integer the key of the current array item
- */
- public function key()
- {
- return $this->_i;
- }
-
- /**
- * Returns the current array item.
- * This method is required by the interface Iterator.
- * @return mixed the current array item
- */
- public function current()
- {
- return $this->_d[$this->_i];
- }
-
- /**
- * Moves the internal pointer to the next array item.
- * This method is required by the interface Iterator.
- */
- public function next()
- {
- $this->_i++;
- }
-
- /**
- * Returns whether there is an item at current position.
- * This method is required by the interface Iterator.
- * @return boolean
- */
- public function valid()
- {
- return $this->_i<$this->_c;
- }
}