X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;ds=sidebyside;f=classes%2Fplfilter.php;h=8355308a82ec04aad9995a751c8048b492a0b5a7;hb=ee47c4357d535e26a408f14e1144a3f8ed85528f;hp=f36a8035bf2584fb152b09b70bff90513eeaf6ca;hpb=778e3dbb6afab4a504c04316995bd8d1ed3090b6;p=platal.git diff --git a/classes/plfilter.php b/classes/plfilter.php index f36a803..8355308 100644 --- a/classes/plfilter.php +++ b/classes/plfilter.php @@ -1,6 +1,6 @@ _tokens; } + + /** This function is called when trying to restrict to one of the + * specific values of the group token. + * + * @return A PlFilterCondition. + */ + public function getCondition($group_value) + { + return null; + } } // }}} @@ -185,7 +195,7 @@ abstract class PFC_OneChild implements PlFilterCondition public function export() { - return array('child' => $child->export()); + return array('child' => $this->child->export()); } } // }}} @@ -228,8 +238,9 @@ abstract class PFC_NChildren implements PlFilterCondition public function export() { $export = array(); - foreach ($this->children as $child) + foreach ($this->children as $child) { $export[] = $child->export(); + } return array('children' => $export); } } @@ -383,6 +394,14 @@ abstract class PlFilter implements PlExportable */ public abstract function get($limit = null); + /** Get ids, selecting only those within a limit + * @param $limit The portion of the matching objects to select + */ + public function getIds($limit = null) + { + return $this->get($limit); + } + /** PRIVATE FUNCTIONS */