PHP Класс PartKeepr\StatisticBundle\Services\StatisticService

Показать файл Открыть проект

Открытые методы

Метод Описание
__construct ( EntityManager $entityManager )
createStatisticSnapshot ( )
getAveragePrice ( ) : float Returns the average price for all parts. Only parts with a price are calculated.
getPartCategoryCount ( ) : integer Returns the part category count.
getPartCount ( boolean | false $withoutPrice = false ) : mixed Returns the part count.
getSampledStatistics ( DateTime $startDate, DateTime $endDate, integer $sampleSize = 25 ) : array Gets the sampled statistics.
getStatisticRange ( ) Returns the range of all recorded statistic snapshots.
getTotalPrice ( ) : float Returns the total price for all parts. Only parts with a price are calculated.
getUnitCounts ( ) : array Returns the part counts per part unit.

Описание методов

__construct() публичный Метод

public __construct ( EntityManager $entityManager )
$entityManager Doctrine\ORM\EntityManager

createStatisticSnapshot() публичный Метод

getAveragePrice() публичный Метод

Returns the average price for all parts. Only parts with a price are calculated.
public getAveragePrice ( ) : float
Результат float The average price

getPartCategoryCount() публичный Метод

Returns the part category count.
public getPartCategoryCount ( ) : integer
Результат integer

getPartCount() публичный Метод

Returns the part count.
public getPartCount ( boolean | false $withoutPrice = false ) : mixed
$withoutPrice boolean | false Set to true to retrieve all parts where the average price is null
Результат mixed

getSampledStatistics() публичный Метод

Gets the sampled statistics.
public getSampledStatistics ( DateTime $startDate, DateTime $endDate, integer $sampleSize = 25 ) : array
$startDate DateTime
$endDate DateTime
$sampleSize integer
Результат array

getStatisticRange() публичный Метод

Returns the range of all recorded statistic snapshots.
public getStatisticRange ( )

getTotalPrice() публичный Метод

Returns the total price for all parts. Only parts with a price are calculated.
public getTotalPrice ( ) : float
Результат float The total price

getUnitCounts() публичный Метод

Returns the part counts per part unit.
public getUnitCounts ( ) : array
Результат array An array of arrays with the keys "name" and "stockLevel"