From 501a6db205b3355bd9e15de6eac20ca033835201 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Barrois?= Date: Mon, 22 Mar 2010 16:02:25 +0100 Subject: [PATCH] Modify PlSet to allow for custom PlFilter getters MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Raphaël Barrois --- classes/plset.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/classes/plset.php b/classes/plset.php index b48fc92..fc96f17 100644 --- a/classes/plset.php +++ b/classes/plset.php @@ -86,6 +86,17 @@ abstract class PlSet */ abstract protected function buildFilter(PlFilterCondition &$cond, $orders); + /** This function returns the results of the given filter + * wihtin $limit ; available when the PlFilter getter isn't the usual get + * @param &$pf The filter + * @param $limit The PlLimit + * @return The results of the filter + */ + protected function &getFilterResults(PlFilter &$pf, PlLimit $limit) + { + return $pf->get($limit); + } + /** This function returns the values of the set * @param $limit A PlLimit for selecting users * @param $orders An optional array of PFO to use before the "default" ones @@ -104,7 +115,7 @@ abstract class PlSet if (is_null($limit)) { $limit = new PlLimit(self::DEFAULT_MAX_RES, 0); } - $it = $pf->get($limit); + $it = $this->getFilterResults($pf, $limit); $this->count = $pf->getTotalCount(); return $it; } -- 2.1.4