+ $this->orders[] = $order;
+ }
+
+ /** Adds a new condition to the PlFilter
+ */
+ public function addCond(PlFilterCondition &$cond)
+ {
+ $this->conds->addChild($cond);
+ }
+
+ /** This function builds the right kind of PlFilter from given data
+ * @param $cond The PlFilterCondition for the filter
+ * @param $orders An array of PlFilterOrder for the filter
+ */
+ abstract protected function buildFilter(PlFilterCondition &$cond, $orders);
+
+ /** This function returns the results of the given filter
+ * wihtin $limit; can be use to replace the default $pf->get call.
+ * @param &$pf The filter
+ * @param $limit The PlLimit
+ * @return The results of the filter
+ */
+ protected function &getFilterResults(PlFilter &$pf, PlLimit $limit)
+ {
+ $res = $pf->get($limit);
+ return $res;
+ }
+
+ /** This function returns the values of the set, and sets $count with the
+ * total number of results.
+ * @param $limit A PlLimit for selecting users
+ * @param $orders An optional array of PFO to use before the "default" ones
+ * @return The result of $pf->get();
+ */
+ public function &get(PlLimit $limit = null, $orders = array())
+ {
+ if (!is_array($orders)) {
+ $orders = array($orders);