Abstract Class shardimage\shardimagephp\services\Service

Inheritanceshardimage\shardimagephp\services\Service » shardimage\shardimagephpapi\base\BaseObject
Subclassesshardimage\shardimagephp\services\AccessTokenService, shardimage\shardimagephp\services\BillingService, shardimage\shardimagephp\services\CloudService, shardimage\shardimagephp\services\DataService, shardimage\shardimagephp\services\FirewallService, shardimage\shardimagephp\services\ImageService, shardimage\shardimagephp\services\JobService, shardimage\shardimagephp\services\SuperBackupService, shardimage\shardimagephp\services\SystemService, shardimage\shardimagephp\services\UploadService, shardimage\shardimagephp\services\UrlService

Base Shardimage service.

Protected Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$client shardimage\shardimagephp\auth\Client Shardimage API Client shardimage\shardimagephp\services\Service
$lastError mixed Last error in the service shardimage\shardimagephp\services\Service
$version string Shardimage module version shardimage\shardimagephp\services\Service

Public Methods

Hide inherited methods

MethodDescriptionDefined By
__construct() Creates the service. shardimage\shardimagephp\services\Service
__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
getController() Shardimage controller shardimage\shardimagephp\services\Service
getLastError() Returns the last error in the service. shardimage\shardimagephp\services\Service
getModule() Shardimage module shardimage\shardimagephp\services\Service
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\shardimagephpapi\base\BaseObject
sendRequest() Sends the request to the Shardimage API and returns with the Response object or the ID for the request if deferred. shardimage\shardimagephp\services\Service

Property Details

$client protected property

Shardimage API Client

$lastError protected property

Last error in the service

protected mixed $lastError null
$version protected property

Shardimage module version

protected string $version 'v1'

Method Details

__construct() public method

Creates the service.

public void __construct ( $client, $config = [] )
$client shardimage\shardimagephp\auth\Client

Shardimage Client

$config array

Configuration

getController() public abstract static method

Shardimage controller

public abstract static void getController ( )
getLastError() public method

Returns the last error in the service.

public mixed getLastError ( )
getModule() public abstract static method

Shardimage module

public abstract static void getModule ( )
sendRequest() protected method

Sends the request to the Shardimage API and returns with the Response object or the ID for the request if deferred.

Optionally throws an exception for soft errors.

protected shardimage\shardimagephpapi\api\Response|string sendRequest ( $requiredParams, $params, $callback )
$requiredParams string[]

Mandatory API parameters for precheck

$params array

API parameters

$callback callable

Response callback

throws \shardimage\shardimagephpapi\base\exceptions\Exception|\shardimage\shardimagephpapi\web\exceptions\HttpException