예제 #1
0
 public function testKit()
 {
     $kit = new app\Kit([]);
     $registry = new app\Registry();
     $registry->setKit($kit);
     $this->assertEquals($kit, $registry->getKit());
 }
예제 #2
0
 /**
  * @return interfaces\Pager
  */
 public function getPager()
 {
     if ($this->pager) {
         return $this->pager;
     }
     $stmt = $this->table->makeStmt($this->buildCountQuery($this->getQuery()), $this->getParams());
     $stmt->execute();
     $row = $stmt->fetch(\PDO::FETCH_NUM);
     $stmt->closeCursor();
     $this->pager = $this->registry->getKit()->makePager($row[0]);
     return $this->pager;
 }