Class shardimage\shardimagephpapi\api\Request

Inheritanceshardimage\shardimagephpapi\api\Request » shardimage\shardimagephpapi\base\BaseObject

API request object.

Public Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$boundary string HTTP boundary for a multipart request shardimage\shardimagephpapi\api\Request
$controller string API controller shardimage\shardimagephpapi\api\Request
$customAction string Non-restful (custom) action shardimage\shardimagephpapi\api\Request
$expire integer Expire time of the request result on the backend (secs, 0: no limit) shardimage\shardimagephpapi\api\Request
$file resource File resource for a file subrequest shardimage\shardimagephpapi\api\Request
$files shardimage\shardimagephpapi\web\FileReference[] File references shardimage\shardimagephpapi\api\Request
$getParams array GET parameters shardimage\shardimagephpapi\api\Request
$id string Unique content ID shardimage\shardimagephpapi\api\Request
$method string HTTP method shardimage\shardimagephpapi\api\Request
$mode string Synchronous/asynchronous request shardimage\shardimagephpapi\api\Request
$module string API module shardimage\shardimagephpapi\api\Request
$multipartType string Content type for a multipart request shardimage\shardimagephpapi\api\Request
$notificationUrl string Optional notification URL shardimage\shardimagephpapi\api\Request
$params array Mandatory parameters shardimage\shardimagephpapi\api\Request
$pollId string Polling request ID shardimage\shardimagephpapi\api\Request
$postParams array POST parameters shardimage\shardimagephpapi\api\Request
$refAttribute string Parent reference attribute for a subrequest (parameter or field of model) shardimage\shardimagephpapi\api\Request
$refId string Parent reference content ID for a subrequest shardimage\shardimagephpapi\api\Request
$requests \GuzzleHttp\Psr7\Request Subrequests of a multipart request (like files) shardimage\shardimagephpapi\api\Request
$restAction string Restful action shardimage\shardimagephpapi\api\Request
$restId mixed Restful ID shardimage\shardimagephpapi\api\Request
$ttl integer Max. execution time of the request on the backend (secs, 0: no limit) shardimage\shardimagephpapi\api\Request
$uri string Uri shardimage\shardimagephpapi\api\Request
$uriParamFormatter callable Optional URI parameter formatter function function($param, $value) { return $value; } shardimage\shardimagephpapi\api\Request
$userAgent string HTTP user agent shardimage\shardimagephpapi\api\Request
$version string API version shardimage\shardimagephpapi\api\Request

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
getSafeGetParams() Returns the GET parameters after replacing the unsafe attributes with NULL (e.g. resources, objects). shardimage\shardimagephpapi\api\Request
getSafeParams() Returns the parameters after replacing the unsafe attributes with NULL (e.g. resources, objects). shardimage\shardimagephpapi\api\Request
getSafePostParams() Returns the POST parameters after replacing the unsafe attributes with NULL (e.g. resources, objects). shardimage\shardimagephpapi\api\Request
init() Request initialization. shardimage\shardimagephpapi\api\Request
isRestCompatible() Returns whether the request is restful compatible. shardimage\shardimagephpapi\api\Request
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

Constants

Hide inherited constants

ConstantValueDescriptionDefined By
MODE_ASYNC 'async/serial' Asynchronous request. shardimage\shardimagephpapi\api\Request
MODE_ASYNC_PARALLEL 'async/parallel' Parallel asynchronous request. shardimage\shardimagephpapi\api\Request
MODE_SYNC 'sync/serial' Synchronous request. shardimage\shardimagephpapi\api\Request
MODE_SYNC_PARALLEL 'sync/parallel' Parallel synchronous request. shardimage\shardimagephpapi\api\Request

Property Details

$boundary public property

HTTP boundary for a multipart request

public string $boundary null
$controller public property

API controller

public string $controller null
$customAction public property

Non-restful (custom) action

public string $customAction null
$expire public property

Expire time of the request result on the backend (secs, 0: no limit)

public integer $expire 0
$file public property

File resource for a file subrequest

public resource $file null
$files public property

File references

$getParams public property

GET parameters

public array $getParams = []
$id public property

Unique content ID

public string $id null
$method public property

HTTP method

public string $method 'POST'
$mode public property

Synchronous/asynchronous request

public string $mode self::MODE_SYNC
$module public property

API module

public string $module null
$multipartType public property

Content type for a multipart request

public string $multipartType null
$notificationUrl public property

Optional notification URL

public string $notificationUrl null
$params public property

Mandatory parameters

public array $params = []
$pollId public property

Polling request ID

public string $pollId null
$postParams public property

POST parameters

public array $postParams = []
$refAttribute public property

Parent reference attribute for a subrequest (parameter or field of model)

public string $refAttribute null
$refId public property

Parent reference content ID for a subrequest

public string $refId null
$requests public property

Subrequests of a multipart request (like files)

public \GuzzleHttp\Psr7\Request $requests = []
$restAction public property

Restful action

public string $restAction null
$restId public property

Restful ID

public mixed $restId null
$ttl public property

Max. execution time of the request on the backend (secs, 0: no limit)

public integer $ttl 0
$uri public property

Uri

public string $uri null
$uriParamFormatter public property

Optional URI parameter formatter function

function($param, $value) {

return $value;

}

$userAgent public property

HTTP user agent

public string $userAgent null
$version public property

API version

public string $version null

Method Details

getSafeGetParams() public method

Returns the GET parameters after replacing the unsafe attributes with NULL (e.g. resources, objects).

public array getSafeGetParams ( )
getSafeParams() public method

Returns the parameters after replacing the unsafe attributes with NULL (e.g. resources, objects).

public array getSafeParams ( )
getSafePostParams() public method

Returns the POST parameters after replacing the unsafe attributes with NULL (e.g. resources, objects).

public array getSafePostParams ( )
init() public method

Request initialization.

This method generates the content ID and determines the HTTP method.

public void init ( )
isRestCompatible() public method

Returns whether the request is restful compatible.

A request can be restful, if the action is restful and the existence of a model and the "id" parameter complies with that action.

public boolean isRestCompatible ( )