PHP Class XeroPHP\Application

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

Protected Properties

Property Type Description
$_config_defaults
$_type_config_defaults array
$config array
$oauth_client XeroPHP\Remote\OAuth\Client

Public Methods

Method Description
__construct ( array $user_config )
delete ( Object $object ) : Response
getAuthorizeURL ( string | null $oauth_token = null ) : string
getConfig ( mixed $key ) : mixed
getOAuthClient ( ) : Client
load ( string $model ) : Query
loadByGUID ( $model, $guid ) : Object | null As you should never have a GUID for a non-existent object, will throw a NotFoundExceptioon
save ( Object $object, boolean $replace_data = false ) : Response | null
saveAll ( Collection | array $objects ) : Response
validateModelClass ( string $class ) : string Validates and expands the provided model class to a full PHP class

Private Methods

Method Description
savePropertiesDirectly ( Object $object ) Function to save properties directly which do not update via a POST.

Method Details

__construct() public method

public __construct ( array $user_config )
$user_config array

delete() public method

public delete ( Object $object ) : Response
$object XeroPHP\Remote\Object
return XeroPHP\Remote\Response

getAuthorizeURL() public method

public getAuthorizeURL ( string | null $oauth_token = null ) : string
$oauth_token string | null
return string

getConfig() public method

public getConfig ( mixed $key ) : mixed
$key mixed
return mixed

getOAuthClient() public method

public getOAuthClient ( ) : Client
return XeroPHP\Remote\OAuth\Client

load() public method

public load ( string $model ) : Query
$model string
return XeroPHP\Remote\Query

loadByGUID() public method

As you should never have a GUID for a non-existent object, will throw a NotFoundExceptioon
public loadByGUID ( $model, $guid ) : Object | null
$model
$guid
return XeroPHP\Remote\Object | null

save() public method

public save ( Object $object, boolean $replace_data = false ) : Response | null
$object XeroPHP\Remote\Object
$replace_data boolean
return XeroPHP\Remote\Response | null

saveAll() public method

public saveAll ( Collection | array $objects ) : Response
$objects XeroPHP\Remote\Collection | array
return XeroPHP\Remote\Response

validateModelClass() public method

Validates and expands the provided model class to a full PHP class
public validateModelClass ( string $class ) : string
$class string
return string

Property Details

$_config_defaults protected static property

protected static $_config_defaults

$_type_config_defaults protected static property

protected static array $_type_config_defaults
return array

$config protected property

protected array $config
return array

$oauth_client protected property

protected Client,XeroPHP\Remote\OAuth $oauth_client
return XeroPHP\Remote\OAuth\Client