original_string: 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);
          }
      }
code: 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);
          }
      }
code_tokens: 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 ) ; } }
docstring: Generate list page for model
docstring_tokens: Generate list page for model