public function find($filter = "", $items_per_page = 20, $page = 0, $order = "", $group = "", $having = "") { if (!$page) { $items_per_page = 0; } if ($page < 1) { $page = 1; } $this->_filter = $filter; $this->_page = (int) $page; $this->_items_per_page = (int) $items_per_page; return parent::find($this->_filter, $this->_items_per_page, ($this->_page - 1) * $this->_items_per_page, $order, $group, $having); }
public function next() { Profile::start(__METHOD__); parent::next(); $this->_stepInOut = 0; $this->_stepFirst = false; while (count($this->_stack) > 0 && $this->_stack[0] < $this->_current_model->rside) { array_shift($this->_stack); $this->_stepInOut--; } if ($this->_stack[0] != $this->_current_model->rside) { array_splice($this->_path, count($this->_path) + $this->_stepInOut++, count($this->_path), (string) $this->_current_model); array_unshift($this->_stack, $this->_current_model->rside); } Profile::stop(__METHOD__); }