PHP Class Locker\Data\Analytics\Analytics

Inheritance: extends app\locker\data\BaseData, implements Locker\Data\Analytics\AnalyticsInterface
Datei anzeigen Open project: learninglocker/learninglocker

Protected Properties

Property Type Description
$query

Public Methods

Method Description
__construct ( Locker\Repository\Query\QueryRepository $query )
statements ( String $lrs_id, array $options, array $sections = null ) : [[String Gets statements.
timedGrouping ( String $lrs_id, array $options ) : [[String Gets timed grouping of statements.

Private Methods

Method Description
addDateFilters ( array $options, array $filters ) : [String Adds date filters from $options to $filters.
buildDates ( string $since = '', string $until = '' ) : [String Build $match dates for Mongo aggregation.
constructFilter ( $options )
getDateOption ( array $options, String $key, Mixed $default = '' ) : MongoDate Gets a date option from options.
getOption ( array $options, String $key, Mixed $default = null, callable $modifier = null ) : MongoDate Gets a option from options.
setFilter ( array $options ) : [String Check the filters passed to see if it contains any where criteria.
setInterval ( String $interval = '' ) : String Gets and validates the Mongo interval.
setMongoDate ( String $date ) : MongoDate Turn submitted date into MongoDate object
setType ( String $type = '' ) : String Gets and validates the type.

Method Details

__construct() public method

public __construct ( Locker\Repository\Query\QueryRepository $query )
$query Locker\Repository\Query\QueryRepository

statements() public method

Gets statements.
public statements ( String $lrs_id, array $options, array $sections = null ) : [[String
$lrs_id String Id of the LRS.
$options array
$sections array
return [[String

timedGrouping() public method

Gets timed grouping of statements.
public timedGrouping ( String $lrs_id, array $options ) : [[String
$lrs_id String Id of the LRS.
$options array
return [[String

Property Details

$query protected_oe property

protected $query