Property | Type | Description | |
---|---|---|---|
$data | Tobscure\JsonApi\ElementInterface | The data object. | |
$errors | array | The errors array. | |
$included | array | The included array. | |
$jsonapi | array | The jsonapi array. |
Method | Description | |
---|---|---|
__construct ( Tobscure\JsonApi\ElementInterface $data = null ) | ||
__toString ( ) : string | Map to string. | |
jsonSerialize ( ) : array | Serialize for JSON usage. | |
setData ( Tobscure\JsonApi\ElementInterface $element ) | Set the data object. | |
setErrors ( array $errors ) | Set the errors array. | |
setJsonapi ( array $jsonapi ) | Set the jsonapi array. | |
toArray ( ) : array | Map everything to arrays. |
Method | Description | |
---|---|---|
getIncluded ( Tobscure\JsonApi\ElementInterface $element, boolean $includeParent = false ) : |
Get included resources. | |
mergeResource ( array $resources, |
public __construct ( Tobscure\JsonApi\ElementInterface $data = null ) | ||
$data | Tobscure\JsonApi\ElementInterface |
protected getIncluded ( Tobscure\JsonApi\ElementInterface $element, boolean $includeParent = false ) : |
||
$element | Tobscure\JsonApi\ElementInterface | |
$includeParent | boolean | |
return |
public jsonSerialize ( ) : array | ||
return | array |
protected mergeResource ( array $resources, |
||
$resources | array | |
$newResource | ||
return |
public setData ( Tobscure\JsonApi\ElementInterface $element ) | ||
$element | Tobscure\JsonApi\ElementInterface |
public setJsonapi ( array $jsonapi ) | ||
$jsonapi | array |
protected ElementInterface,Tobscure\JsonApi $data | ||
return | Tobscure\JsonApi\ElementInterface |