From: Raphaël Barrois Date: Mon, 22 Mar 2010 15:02:25 +0000 (+0100) Subject: Modify PlSet to allow for custom PlFilter getters X-Git-Tag: core/1.1.0~29 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=501a6db205b3355bd9e15de6eac20ca033835201;p=platal.git Modify PlSet to allow for custom PlFilter getters Signed-off-by: Raphaël Barrois --- 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; }