PHP Class Roomify\Bat\Store\SqlDBStore

Inheritance: extends Store
Show file Open project: roomify/bat Class Usage Examples

Public Properties

Property Type Description
$day_table The table that holds day data.
$day_table_no_prefix The table that holds day data without prefix.
$event_type The event type we are dealing with.
$hour_table The table that holds hour data.
$hour_table_no_prefix The table that holds hour data without prefix.
$minute_table The table that holds minute data.
$minute_table_no_prefix The table that holds minute data without prefix.

Public Methods

Method Description
__construct ( $event_type, string $event_data = 'state', $prefix = '' ) SqlDBStore constructor.
buildQueries ( DateTime $start_date, DateTime $end_date, $unit_ids ) : array

Method Details

__construct() public method

Provided with the event type it will determine the appropriate table names to store data in. This assumes standard behaviour from Bat_Event
public __construct ( $event_type, string $event_data = 'state', $prefix = '' )
$event_type
$event_data string

buildQueries() public method

public buildQueries ( DateTime $start_date, DateTime $end_date, $unit_ids ) : array
$start_date DateTime
$end_date DateTime
$unit_ids
return array

Property Details

$day_table public property

The table that holds day data.
public $day_table

$day_table_no_prefix public property

The table that holds day data without prefix.
public $day_table_no_prefix

$event_type public property

The event type we are dealing with.
public $event_type

$hour_table public property

The table that holds hour data.
public $hour_table

$hour_table_no_prefix public property

The table that holds hour data without prefix.
public $hour_table_no_prefix

$minute_table public property

The table that holds minute data.
public $minute_table

$minute_table_no_prefix public property

The table that holds minute data without prefix.
public $minute_table_no_prefix