class Report (View source)

Properties

protected $session
protected ReportDownloader $reportDownloader
protected $format
protected $data Report Data
protected $query
protected string $fields
protected string $during During clause
protected string $where Where Condition
protected string $type
protected bool $magicSelect

Methods

__construct(null $session = null)

Reports constructor.

$this
format($format)

Set the format for the report.

$this
select($fields)

Set the fields to retrieve

$this
from($reportType)

Set the report type

$this
during($starting, $ending)

Set the starting and ending dates for the report.

$this
where($condition)

Set where condition

$this
magicSelect()

Mark magicSelect as true.

getAsSimpleXMLObj()

Get the report as a SimpleXMLObj

getAsObj()

Get the report as an object

string
getAsString()

Get report as string

Stream
getStream()

Get report as stream

bool
saveToFile($filePath, string $format = 'csvforexcel')

Save the report in a file.

$this
except($excepts)

Pull fields out of fields list.

array
getTypes()

No description

array
getFields()

No description

array
getFormats()

Get a list of the report formats.

__get($name)

No description

Details

__construct(null $session = null)

Reports constructor.

Parameters

null $session

$this format($format)

Set the format for the report.

Parameters

$format

Return Value

$this

$this select($fields)

Set the fields to retrieve

Parameters

$fields

Return Value

$this

$this from($reportType)

Set the report type

Parameters

$reportType

Return Value

$this

$this during($starting, $ending)

Set the starting and ending dates for the report.

dates format 'Ymd' => e.g. 20170112,20171020

Parameters

$starting
$ending

Return Value

$this

Exceptions

Report

$this where($condition)

Set where condition

Parameters

$condition

Return Value

$this

$this magicSelect()

Mark magicSelect as true.

Return Value

$this

SimpleXMLElement getAsSimpleXMLObj()

Get the report as a SimpleXMLObj

Return Value

SimpleXMLElement

MyReport getAsObj()

Get the report as an object

Return Value

MyReport

string getAsString()

Get report as string

Return Value

string

Stream getStream()

Get report as stream

Return Value

Stream

bool saveToFile($filePath, string $format = 'csvforexcel')

Save the report in a file.

Parameters

$filePath
string $format

Return Value

bool

$this except($excepts)

Pull fields out of fields list.

Parameters

$excepts

Return Value

$this

array getTypes()

Return Value

array

array getFields()

Return Value

array

array getFormats()

Get a list of the report formats.

Return Value

array

__get($name)

Parameters

$name