summaryrefslogtreecommitdiff
path: root/framework/Collections/TPagedDataSource.php
diff options
context:
space:
mode:
authorxue <>2006-08-01 12:27:41 +0000
committerxue <>2006-08-01 12:27:41 +0000
commitc62323a40a833d991c091f8cd99bf9a4f29bfc6c (patch)
tree9e03b4eb6cdbed4ea2ae9e105ae567977afff2a6 /framework/Collections/TPagedDataSource.php
parenta27e42c150fbc19eb848d1d1a73d1dddd713d48f (diff)
Changed PHP minimum requirement to 5.1.0
Diffstat (limited to 'framework/Collections/TPagedDataSource.php')
-rw-r--r--framework/Collections/TPagedDataSource.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/framework/Collections/TPagedDataSource.php b/framework/Collections/TPagedDataSource.php
index 6192b1f7..a2bce9e3 100644
--- a/framework/Collections/TPagedDataSource.php
+++ b/framework/Collections/TPagedDataSource.php
@@ -28,7 +28,7 @@
* @package System.Collections
* @since 3.0
*/
-class TPagedDataSource extends TComponent implements IteratorAggregate
+class TPagedDataSource extends TComponent implements IteratorAggregate,Countable
{
/**
* @var mixed original data source
@@ -183,6 +183,16 @@ class TPagedDataSource extends TComponent implements IteratorAggregate
}
/**
+ * Returns the number of items in the current page.
+ * This method is required by Countable interface.
+ * @return integer number of items in the current page.
+ */
+ public function count()
+ {
+ return $this->getCount();
+ }
+
+ /**
* @return integer number of pages
*/
public function getPageCount()