Ejemplo n.º 1
0
 /**
  * Set limit on database and adds total count to metadata
  */
 protected function paginate()
 {
     $limit = $this->getParameter('limit');
     if ($limit !== NULL) {
         $offset = 0;
         if (strpos($limit, ',')) {
             list($limit, $offset) = explode(',', $limit);
         }
         $this->metadata['count'] = $this->table->count();
         $this->table->limit($limit, $offset);
     }
 }