diff options
author | xue <> | 2006-08-01 12:27:41 +0000 |
---|---|---|
committer | xue <> | 2006-08-01 12:27:41 +0000 |
commit | c62323a40a833d991c091f8cd99bf9a4f29bfc6c (patch) | |
tree | 9e03b4eb6cdbed4ea2ae9e105ae567977afff2a6 /framework/Collections/TStack.php | |
parent | a27e42c150fbc19eb848d1d1a73d1dddd713d48f (diff) |
Changed PHP minimum requirement to 5.1.0
Diffstat (limited to 'framework/Collections/TStack.php')
-rw-r--r-- | framework/Collections/TStack.php | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/framework/Collections/TStack.php b/framework/Collections/TStack.php index 79d17902..f1118d90 100644 --- a/framework/Collections/TStack.php +++ b/framework/Collections/TStack.php @@ -31,7 +31,7 @@ * @package System.Collections
* @since 3.0
*/
-class TStack extends TComponent implements IteratorAggregate
+class TStack extends TComponent implements IteratorAggregate,Countable
{
/**
* internal data storage
@@ -160,6 +160,16 @@ class TStack extends TComponent implements IteratorAggregate {
return $this->_c;
}
+
+ /**
+ * Returns the number of items in the stack.
+ * This method is required by Countable interface.
+ * @return integer number of items in the stack.
+ */
+ public function count()
+ {
+ return $this->getCount();
+ }
}
/**
|