private function paginate()
    {
        $this->list = null;
        try {
            $query = $this->prepareQuery();
            $this->addFilters($query);
            $this->checkReturnFields($query);
            $this->addOrders($query);
            list($page, $limit) = $this->extractPagination();
            if ($limit === -1) {
                $this->list = $query->find($this->con);
            } else {
                $this->list = $query->paginate($page, $limit, $this->con);
            }
        } catch (\Exception $e) {
            Logger::log($e->getMessage(), LOG_ERR);
        }
    }
private function paginate()
    {
        $this->list = null;
        try {
            $query = $this->prepareQuery();
            $this->addFilters($query);
            $this->checkReturnFields($query);
            $this->addOrders($query);
            list($page, $limit) = $this->extractPagination();
            if ($limit === -1) {
                $this->list = $query->find($this->con);
            } else {
                $this->list = $query->paginate($page, $limit, $this->con);
            }
        } catch (\Exception $e) {
            Logger::log($e->getMessage(), LOG_ERR);
        }
    }
private function paginate ( ) { $ this -> list = null ; try { $ query = $ this -> prepareQuery ( ) ; $ this -> addFilters ( $ query ) ; $ this -> checkReturnFields ( $ query ) ; $ this -> addOrders ( $ query ) ; list ( $ page , $ limit ) = $ this -> extractPagination ( ) ; if ( $ limit === - 1 ) { $ this -> list = $ query -> find ( $ this -> con ) ; } else { $ this -> list = $ query -> paginate ( $ page , $ limit , $ this -> con ) ; } } catch ( \ Exception $ e ) { Logger :: log ( $ e -> getMessage ( ) , LOG_ERR ) ; } }
Generate list page for model
Generate list page for model