Esempio n. 1
0
 /**
  * Returns the number of objects in the result
  *
  * @return integer The number of matching objects
  * @api
  */
 public function count()
 {
     if (is_array($this->queryResult)) {
         return count($this->queryResult);
     } else {
         return $this->persistenceManager->getObjectCountByQuery($this->query);
     }
 }
 /**
  * Returns the number of objects in the result
  *
  * @return integer The number of matching objects
  * @api
  */
 public function count()
 {
     if ($this->numberOfResults === null) {
         if (is_array($this->queryResult)) {
             $this->numberOfResults = count($this->queryResult);
         } else {
             $this->numberOfResults = $this->persistenceManager->getObjectCountByQuery($this->query);
         }
     }
     return $this->numberOfResults;
 }