PHP Class Elcodi\Admin\CoreBundle\Controller\Abstracts\AbstractStatsController

Inheritance: extends Symfony\Bundle\FrameworkBundle\Controller\Controller
Show file Open project: elcodi/bamboo

Protected Methods

Method Description
getDailyStats ( string $entity ) : integer return number of entity instances from today
getMonthlyStats ( string $entity ) : integer return number of entity instances from the begining of the month
getTotalStats ( string $entity ) : integer return number of entity instances from the begining
getTotalsByInterval ( string $entity, DateTime $from = null, DateTime $to = null ) : array Get total elements of certain entity, given an interval

Method Details

getDailyStats() protected method

return number of entity instances from today
protected getDailyStats ( string $entity ) : integer
$entity string Entity namespace parameter
return integer Total of today instances

getMonthlyStats() protected method

return number of entity instances from the begining of the month
protected getMonthlyStats ( string $entity ) : integer
$entity string Entity namespace parameter
return integer Total of monthly instances

getTotalStats() protected method

return number of entity instances from the begining
protected getTotalStats ( string $entity ) : integer
$entity string Entity namespace parameter
return integer Total of instances

getTotalsByInterval() protected method

Get total elements of certain entity, given an interval
protected getTotalsByInterval ( string $entity, DateTime $from = null, DateTime $to = null ) : array
$entity string Entity class parameter
$from DateTime From
$to DateTime To
return array