count() public méthode

public count ( Kdyby\Persistence\Queryable $repository, ResultSet $resultSet = NULL, Doctrine\ORM\Tools\Pagination\Paginator $paginatedQuery = NULL ) : integer
$repository Kdyby\Persistence\Queryable
$resultSet ResultSet
$paginatedQuery Doctrine\ORM\Tools\Pagination\Paginator
Résultat integer
Exemple #1
0
 /**
  * @throws \Kdyby\Doctrine\QueryException
  * @return int
  */
 public function getTotalCount()
 {
     if ($this->totalCount === NULL) {
         try {
             $this->frozen = TRUE;
             $paginatedQuery = $this->createPaginatedQuery($this->query);
             if ($this->queryObject !== NULL && $this->repository !== NULL) {
                 $this->totalCount = $this->queryObject->count($this->repository, $this, $paginatedQuery);
             } else {
                 $this->totalCount = $paginatedQuery->count();
             }
         } catch (ORMException $e) {
             throw new QueryException($e, $this->query, $e->getMessage());
         }
     }
     return $this->totalCount;
 }