Methods
Constructor method which is used to set some config stuff and load the schema file
__construct(Salesking $api, array $config)
Parameters
$config
array
configuration array
magic getter function to get object properties
__get(string $property) : mixed
Parameters
$property
string
Returns
mixed
magic setter function to set object data
__set(string $property, mixed $value)
Parameters
$property
string
$value
mixed
Exceptions
converts object data to an JSON encoded string
__toString() : string
Returns
string
JSON-encoded object data
helper function to bind data to object
bind(array | object $data, array $map) : \SaleskingObject
Parameters
$data
arrayobject
$map
array
array("company" => "organisation") maps value of company to organisation
Exceptions
Returns
Deletes the current object
delete() : mixed
Exceptions
Returns
mixed
response
Get Salesking API endpoint for a specific task
getEndpoint(string $rel) : object
Parameters
$rel
string
Exceptions
Returns
object
endpoint information
Fetch object type
getType() : string
Returns
string
object type
load object data from Salesking
load(string $id) : \SaleskingObject
Parameters
Exceptions
Returns
Saves the current object to Salesking
save() : mixed
Exceptions
Returns
mixed
response
set object type
setType(string $type)
Validate input values for the specified object property
validate(string $property, mixed $value) : bool
Parameters
$property
string
$value
mixed
Returns
bool
Properties
object data
$data : array
object schema
$schema : mixed
object type
$type : string