Exemple #1
0
 public function testPaginatedToArrayReturnsPagerInstance()
 {
     $query = Query::from(array());
     $this->assertInstanceOf('Pagerfanta\\Pagerfanta', $query->toPaginatedArray(1, 10));
 }
Exemple #2
0
 /**
  * {@inheritDoc}
  */
 public function query()
 {
     $content = $this->cache->fetch($this->getClassName());
     if (!$content) {
         $content = $this->loader->load($this->metadata, $this->parser);
         $this->cache->save($this->getClassName(), $content);
     }
     return Query::from($content);
 }