Class shardimage\shardimagephp\auth\Client

Inheritanceshardimage\shardimagephp\auth\Client » shardimage\shardimagephpapi\base\BaseObject

Client class provides communication with Shardimage API.

$client = new Client([
     'apiKey' => '<apiKey>',
     'apiSecret' => '<apiSecret>',
     'imageSecret' => '<imageSecret>',
     'cloudId' => '<cloudId>',
]);

Public Methods

Hide inherited methods

MethodDescriptionDefined By
__construct() Creates the object, populates the properties and calls the "init" method. shardimage\shardimagephpapi\base\BaseObject
__get() Returns the value of a non-defined property, it there is a getter method. shardimage\shardimagephpapi\base\BaseObject
__isset() Does the non-defined property with a getter exist and is it not NULL? shardimage\shardimagephpapi\base\BaseObject
__set() Sets the value of a non-defined property, if there is a setter method. shardimage\shardimagephpapi\base\BaseObject
__unset() Sets the value of a non-defined property to NULL, if there is a setter. shardimage\shardimagephpapi\base\BaseObject
async() Setting up async request shardimage\shardimagephp\auth\Client
defer() Setting up deferred request. shardimage\shardimagephp\auth\Client
fillParams() shardimage\shardimagephp\auth\Client
getAccessTokenService() shardimage\shardimagephp\auth\Client
getBillingService() shardimage\shardimagephp\auth\Client
getCloudService() shardimage\shardimagephp\auth\Client
getDataService() shardimage\shardimagephp\auth\Client
getFirewallService() shardimage\shardimagephp\auth\Client
getImageHostName() shardimage\shardimagephp\auth\Client
getImageService() shardimage\shardimagephp\auth\Client
getJobService() shardimage\shardimagephp\auth\Client
getLastError() shardimage\shardimagephp\auth\Client
getParam() shardimage\shardimagephp\auth\Client
getSuperBackupService() shardimage\shardimagephp\auth\Client
getSystemService() shardimage\shardimagephp\auth\Client
getUploadService() shardimage\shardimagephp\auth\Client
getUrlService() shardimage\shardimagephp\auth\Client
send() shardimage\shardimagephp\auth\Client
toArray() Converts the object an array. shardimage\shardimagephpapi\base\BaseObject

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
ensureClass() Creates an object from the given parameters. shardimage\shardimagephpapi\base\BaseObject
init() Custom initialization. shardimage\shardimagephp\auth\Client

Constants

Hide inherited constants

ConstantValueDescriptionDefined By
VERSION '1.0.0' shardimage\shardimagephp\auth\Client

Property Details

$apiAccessToken public property

Shardimage API access token

public string $apiAccessToken null
$apiAccessTokenSecret public property

Shardimage API access token secret

$apiConfig public property

Shardimage API config

public string $apiConfig null
$apiHost public property

Shardimage API host

public string $apiHost 'https://api.shardimage.com'
$apiKey public property

Shardimage API key

public string $apiKey null
$apiSecret public property

Shardimage API secret

public string $apiSecret null
$cache public property

Cache interface

$cacheExpiration public property

Cache expiration

public integer $cacheExpiration null
$cloudId public property

Default cloud ID

public string $cloudId null
$debug public property

Enable debugging

public boolean $debug false
$imageHost public property

Shardimage image host

public string $imageHost 'https://img.shardimage.com'
$imageSecret public property

Shardimage Image secret

public string $imageSecret null
$logger public property

Logger instance.

public \Psr\Log\LoggerInterface $logger null
$proxy public property

Proxy settings (protocol://host:port)

public string $proxy null
$softExceptionEnabled public property

Allow dismissing soft exceptions

$useGzip public property

Enable gzip compression

public boolean $useGzip true
$useMsgPack public property

Enable using MsgPack

public boolean $useMsgPack true

Method Details

async() public method

Setting up async request

public void async ( $enable )
$enable boolean
defer() public method

Setting up deferred request.

If setting false and there are defered request, it will send together.

public mixed defer ( $enable )
$enable boolean
fillParams() public method

public array fillParams ( $requiredParams, $params )
$requiredParams array
$params array
throws shardimage\shardimagephpapi\base\exceptions\InvalidParamException
getAccessTokenService() public method

public shardimage\shardimagephp\services\AccessTokenService getAccessTokenService ( )
getBillingService() public method

public shardimage\shardimagephp\services\BillingService getBillingService ( )
getCloudService() public method

public shardimage\shardimagephp\services\CloudService getCloudService ( )
getDataService() public method

public shardimage\shardimagephp\services\DataService getDataService ( )
getFirewallService() public method

public shardimage\shardimagephp\services\FirewallService getFirewallService ( )
getImageHostName() public method

public string getImageHostName ( )
getImageService() public method

public shardimage\shardimagephp\services\ImageService getImageService ( )
getJobService() public method

public shardimage\shardimagephp\services\JobService getJobService ( )
getLastError() public method

public string getLastError ( )
getParam() public method

public void getParam ( $params, $param )
$params array
$param string
getSuperBackupService() public method

public shardimage\shardimagephp\services\SuperBackupService getSuperBackupService ( )
getSystemService() public method

public shardimage\shardimagephp\services\SystemService getSystemService ( )
getUploadService() public method

public shardimage\shardimagephp\services\UploadService getUploadService ( )
getUrlService() public method

public shardimage\shardimagephp\services\UrlService getUrlService ( )
init() protected method

Custom initialization.

protected void init ( )
send() public method

public void send ( $requiredParams, $params, $callback )
$requiredParams string[]
$params array
$callback callable