示例#1
0
 /**
  * {@inheritDoc}
  */
 public function getItemCount()
 {
     if (null === $this->itemCount) {
         $this->itemCount = $this->adapter->getItemCount();
     }
     return $this->itemCount;
 }
示例#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;
 }
示例#3
0
 /**
  * {@inheritDoc}
  */
 public function getCount(AdapterInterface $adapter, $page, $perPage)
 {
     return (int) ceil($adapter->getItemCount() / $perPage);
 }
示例#4
0
文件: Page.php 项目: kgilden/pager
 /**
  * {@inheritDoc}
  */
 public function getItemCount()
 {
     return $this->itemCount ?: ($this->itemCount = $this->adapter->getItemCount());
 }
示例#5
0
 /**
  * {@inheritDoc}
  */
 public function getItemCount()
 {
     return $this->adapter->getItemCount();
 }