/** * {@inheritDoc} */ public function getItemCount() { if (null === $this->itemCount) { $this->itemCount = $this->adapter->getItemCount(); } return $this->itemCount; }
/** * {@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; }
/** * {@inheritDoc} */ public function getCount(AdapterInterface $adapter, $page, $perPage) { return (int) ceil($adapter->getItemCount() / $perPage); }
/** * {@inheritDoc} */ public function getItemCount() { return $this->itemCount ?: ($this->itemCount = $this->adapter->getItemCount()); }
/** * {@inheritDoc} */ public function getItemCount() { return $this->adapter->getItemCount(); }