PHP 클래스 PartKeepr\StatisticBundle\Services\StatisticService

파일 보기 프로젝트 열기: partkeepr/PartKeepr

공개 메소드들

메소드 설명
__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"