ZEROSPAM\Framework\SDK\Response\Api\Collection\CollectionResponse
Class CollectionResponse
Represent a response that contains more Responses
Synopsis
class CollectionResponse
extends BaseResponse
implements
IteratorAggregate,ArrayAccess
{
- // members
- private CollectionMetaData $metaData;
- // methods
- public void __construct()
- protected abstract static IResponse dataToResponse()
- public CollectionMetaData getMetaData()
- public ArrayIterator getIterator()
- public boolean offsetExists()
- public mixed offsetGet()
- public void offsetSet()
- public void offsetUnset()
- // Inherited methods from BaseResponse
- public void __construct()
- public void setRawData()
- public array getRawData()
- public array data()
- public mixed getRawValue()
- public mixed|null get()
- public void __isset()
- public void __get()
- public void populateDataObject()
- // Inherited methods from RateLimitedTrait
- public RateLimitData getRateLimit()
- public $this setRateLimit()
Hierarchy
Members
private
protected
- $data — array
- $dates
—
array
Dates to be transTyped from string to Carbon. - $rateLimit — ZEROSPAM\Framework\SDK\Response\RateLimit\RateLimitData
- $rawData
—
array
Data unprocessed
Methods
protected
- dataToResponse() — Transform the basic data (string[]) into a response (IResponse)
public
- __construct() — CollectionResponse constructor.
- getIterator() — Retrieve an external iterator
- getMetaData() — Meta data of the collection (pagination mostly)
- offsetExists() — Whether a offset exists
- offsetGet() — Offset to retrieve
- offsetSet() — Offset to set
- offsetUnset() — Offset to unset
Inherited from ZEROSPAM\Framework\SDK\Response\Api\BaseResponse
public
- __get()
- __isset()
- data() — Data contained in the response.
- get() — Get a specific field.
- getRawData() — Used internally
- getRawValue() — Return value in response array of the response.
- populateDataObject() — Populate the data object with the data present in the response
- setRawData() — Used internally
Inherited from ZEROSPAM\Framework\SDK\Response\Api\Helper\RateLimitedTrait
public
History
-
2018-07-16T14:26:38+00:00 (commit #290a97d)
Author: Antoine Aflalo (antoine.aflalo@zerospam.ca) / Commiter: Antoine Aflalo (antoine.aflalo@zerospam.ca)
feat(Response): Split Ratelimited from BaseResponse New type of response can now be easily build.