Api

Description

Protected Properties

string $domain
 
string $key
 
LoggerInterface $logger
 
string $password
 
Pool $pool
 

Public Methods

 __construct (string $domain, string $key, string $password, Pool $pool=null)
 
Generator mixed AbstractEntity[] advancedSearch (string $class, array $query)
 
void delete (string $path, array $query=[])
 
null array exec (string $method, string $path, array $curlOpts=[])
 
mixed factory ($caller, string $class, array $data=[])
 
array factoryAll ($caller, string $class, array $list)
 
null array get (string $path, array $query=[])
 
null Location getLocation (string $id)
 
LoggerInterface getLogger ()
 
User getMe ()
 
Pool getPool ()
 
Shop getShop ()
 
null mixed AbstractEntity load ($caller, string $class, string $path, array $query=[])
 
array Data[] loadAll ($caller, string $class, string $path, array $query=[])
 
null array post (string $path, array $data=[])
 
null array put (string $path, array $data=[])
 
$this setLogger (LoggerInterface $logger)
 

Constructor

◆ __construct()

__construct ( string  $domain,
string  $key,
string  $password,
Pool  $pool = null 
)
Parameters
string$domain
string$key
string$password
null | Pool$pool

Methods

◆ advancedSearch()

Generator mixed AbstractEntity [] advancedSearch ( string  $class,
array  $query 
)
Parameters
string$class
array$query
Returns
Generator|mixed|AbstractEntity[]

◆ delete()

void delete ( string  $path,
array  $query = [] 
)
Parameters
string$path
array$query

◆ exec()

null array exec ( string  $method,
string  $path,
array  $curlOpts = [] 
)
Parameters
string$method
string$path
array$curlOpts
Returns
null|array

◆ factory()

mixed factory (   $caller,
string  $class,
array  $data = [] 
)
Parameters
Api | Data$caller
string$class
array$data
Returns
mixed

◆ factoryAll()

array factoryAll (   $caller,
string  $class,
array  $list 
)
Parameters
Api | Data$caller
string$class
array[]$list
Returns
array

◆ get()

null array get ( string  $path,
array  $query = [] 
)
Parameters
string$path
array$query
Returns
null|array

◆ getLocation()

null Location getLocation ( string  $id)
Parameters
string$id
Returns
null|Location

◆ getLogger()

LoggerInterface getLogger ( )
Returns
LoggerInterface

◆ getMe()

User getMe ( )
Returns
User

◆ getPool()

Pool getPool ( )
Returns
Pool

◆ getShop()

Shop getShop ( )
Returns
Shop

◆ load()

null mixed AbstractEntity load (   $caller,
string  $class,
string  $path,
array  $query = [] 
)
Parameters
Api | Data$caller
string$class
string$path
array$query
Returns
null|mixed|AbstractEntity

◆ loadAll()

array Data [] loadAll (   $caller,
string  $class,
string  $path,
array  $query = [] 
)
Parameters
Api | Data$caller
string$class
string$path
array$query
Returns
array|Data[]

◆ post()

null array post ( string  $path,
array  $data = [] 
)
Parameters
string$path
array$data
Returns
null|array

◆ put()

null array put ( string  $path,
array  $data = [] 
)
Parameters
string$path
array$data
Returns
null|array

◆ setLogger()

$this setLogger ( LoggerInterface  $logger)
final
Parameters
LoggerInterface$logger
Returns
$this