Esempio n. 1
0
 /**
  * {@inheritDoc}
  */
 public function getItemCount()
 {
     if (null === $this->itemCount) {
         $this->itemCount = $this->adapter->getItemCount();
     }
     return $this->itemCount;
 }
Esempio n. 2
0
 /**
  * {@inheritDoc}
  */
 public function getCount(AdapterInterface $adapter, $page, $perPage)
 {
     $itemCount = $adapter->getItemCount();
     $pageCount = (int) ceil($itemCount / $perPage);
     if ($this->shouldMerge($itemCount, $perPage)) {
         return $pageCount - 1;
     }
     return $pageCount;
 }
Esempio n. 3
0
 /**
  * {@inheritDoc}
  */
 public function getCount(AdapterInterface $adapter, $page, $perPage)
 {
     return (int) ceil($adapter->getItemCount() / $perPage);
 }
Esempio n. 4
0
 /**
  * {@inheritDoc}
  */
 public function getItemCount()
 {
     return $this->itemCount ?: ($this->itemCount = $this->adapter->getItemCount());
 }
Esempio n. 5
0
 /**
  * {@inheritDoc}
  */
 public function getItemCount()
 {
     return $this->adapter->getItemCount();
 }