PHP Class XeroPHP\Remote\Query

Show file Open project: calcinai/xero-php Class Usage Examples

Public Methods

Method Description
__construct ( Application $app )
addWhere ( string $operator, array $args )
andWhere ( ) Chains an AND WHERE statement on to the query.
date ( DateTime $date )
execute ( ) : Collection
from ( string $class )
fromDate ( DateTime $fromDate )
getFrom ( ) : mixed
getWhere ( ) : string Concatenates the array of where statements stored in $this->where and returns them as a string
modifiedAfter ( DateTimeInterface $modifiedAfter = null )
offset ( integer $offset )
orWhere ( ) Chains an OR WHERE statement on to the query
orderBy ( string $order, string $direction = self::ORDER_ASC )
page ( integer $page = 1 )
toDate ( DateTime $toDate )
where ( ) Adds a WHERE statement to the query.

Method Details

__construct() public method

public __construct ( Application $app )
$app XeroPHP\Application

addWhere() public method

public addWhere ( string $operator, array $args )
$operator string
$args array

andWhere() public method

( Note this method is effectively an alias for where() to help make fluent queries more readable and less ambiguous )
public andWhere ( )

date() public method

public date ( DateTime $date )
$date DateTime

execute() public method

public execute ( ) : Collection
return Collection

from() public method

public from ( string $class )
$class string

fromDate() public method

public fromDate ( DateTime $fromDate )
$fromDate DateTime

getFrom() public method

public getFrom ( ) : mixed
return mixed

getWhere() public method

Concatenates the array of where statements stored in $this->where and returns them as a string
public getWhere ( ) : string
return string

modifiedAfter() public method

public modifiedAfter ( DateTimeInterface $modifiedAfter = null )
$modifiedAfter DateTimeInterface

offset() public method

public offset ( integer $offset )
$offset integer

orWhere() public method

Chains an OR WHERE statement on to the query
public orWhere ( )

orderBy() public method

public orderBy ( string $order, string $direction = self::ORDER_ASC )
$order string
$direction string

page() public method

public page ( integer $page = 1 )
$page integer

toDate() public method

public toDate ( DateTime $toDate )
$toDate DateTime

where() public method

Can also be used to chain an AND WHERE statement to a query.
public where ( )