From 1e09d721ec541df81de68989eed42c7b72ce8d7c Mon Sep 17 00:00:00 2001 From: knut <> Date: Wed, 30 May 2007 13:37:54 +0000 Subject: resolved #631 --- framework/Collections/TQueue.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'framework/Collections') diff --git a/framework/Collections/TQueue.php b/framework/Collections/TQueue.php index e70b0ded..025fa6d0 100644 --- a/framework/Collections/TQueue.php +++ b/framework/Collections/TQueue.php @@ -31,7 +31,7 @@ * @package System.Collections * @since 3.1 */ -class TQueue extends TComponent implements IteratorAggregate +class TQueue extends TComponent implements IteratorAggregate,Countable { /** * internal data storage @@ -160,6 +160,16 @@ class TQueue extends TComponent implements IteratorAggregate { return $this->_c; } + + /** + * Returns the number of items in the queue. + * This method is required by Countable interface. + * @return integer number of items in the queue. + */ + public function count() + { + return $this->getCount(); + } } /** -- cgit v1.2.3