/** * @see Countable::count * @todo Esta es la implementación original. Refactor. */ public function count() { $grouping = $this->result->getGrouping(); $numFound = $this->result->getNumFound(); if (empty($numFound) && !empty($grouping)) { $groups = $grouping->getGroups(); $fieldGroup = reset($groups); $numFound = $fieldGroup->getNumberOfGroups(); } return $numFound; }
/** * Countable implementation * * @return int */ public function count() { // if no results are available yet, get them now if (null == $this->result) { $this->fetchNext(); } return $this->result->getNumFound(); }
public function getTotalCount() { $this->execute(); return $this->selectResult->getNumFound(); }