point-tools/src/Skobkin/Bundle/PointToolsBundle/Entity/UserRepository.php

18 lines
354 B
PHP
Raw Normal View History

2015-06-23 09:38:43 +00:00
<?php
namespace Skobkin\Bundle\PointToolsBundle\Entity;
use Doctrine\ORM\EntityRepository;
class UserRepository extends EntityRepository
{
/**
* @return integer
*/
public function getUsersCount()
{
$qb = $this->createQueryBuilder('u');
return $qb->select('COUNT(u)')->getQuery()->getSingleScalarResult();
}
}