*
* "$ME" => "joined table alias" is always added to these.
*/
- private $joinMetas = array();
+ protected $joinMetas = array();
+
+ protected $joinMethods = array();
/** Build the 'join' part of the query
* This function will call all methods declared in self::$joinMethods
* to get an array of PlSqlJoin objects to merge
*/
- private function buildJoins()
+ protected function buildJoins()
{
$joins = array();
- foreach ($this->$joinMethods as $method) {
+ foreach ($this->joinMethods as $method) {
$joins = array_merge($joins, $this->$method());
}
- return PlSqlJoin::formatJoins($joins, $this->$joinMetas);
+ return PlSqlJoin::formatJoins($joins, $this->joinMetas);
}
}
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************/
+
/** UserSet is a light-weight Model/View tool for displaying a set of items
*/
abstract class PlSet
*/
abstract protected function buildFilter(PlFilterCondition &$cond, $orders);
- public function &get(PlFilterLimit $limit = null)
+ public function &get(PlLimit $limit = null)
{
$pf = $this->buildFilter($this->conds, $this->orders);
+ if (is_null($limit)) {
+ $limit = new PlLimit(20, 0);
+ }
$it = $pf->get($limit);
$this->count = $pf->getTotalCount();
return $it;