예제 #1
0
 /**
  * @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;
 }
예제 #2
0
 /**
  * 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();
 }
예제 #3
0
 public function getTotalCount()
 {
     $this->execute();
     return $this->selectResult->getNumFound();
 }