Property | Type | Description | |
---|---|---|---|
$_data | array | Internal storage of primitive types | |
$_embedded | array | Internal storage of Resource objects | |
$_links | array | Internal storage of Link objects | |
$jsonNumericCheck | boolean |
Method | Description | |
---|---|---|
__construct ( string | |
||
__toJson ( ) : string | ||
__toString ( ) : string | ||
getLinks ( ) : array | ||
getSelf ( ) : |
||
getXML ( SimpleXMLElemen\SimpleXMLElement | null $xml = null ) : SimpleXMLElement | ||
setData ( $rel, null $data = null ) : |
||
setEmbedded ( string $rel, |
||
setJsonNumericCheck ( boolean $jsonNumericCheck = self::JSON_NUMERIC_CHECK_OFF ) : |
Sets the ability to perform numeric to int conversion of the JSON output. | |
setLink ( |
Add a link to the resource. | |
setLinks ( array $links, boolean $singular = false, boolean $plural = false ) : |
Convenience function to set multiple links at once | |
setXML ( SimpleXMLElement $xml ) : |
||
toArray ( ) : array |
Method | Description | |
---|---|---|
_addData ( SimpleXMLElement $xml, array $data, string $keyOverride = null ) | ||
_addLink ( |
||
_addLinks ( |
||
_getEmbRes ( |
||
_getEmbedded ( mixed $embedded, string | null $_rel = null ) | ||
_recurseEmbedded ( |
||
_recurseLinks ( array | |
||
createLink ( $href, $title, $name, $hreflang ) : |
protected _getEmbRes ( |
||
$embed | ||
return | SimpleXMLElement |
protected _recurseEmbedded ( |
||
$embeded |
protected _recurseLinks ( array | |
||
$links | array | |
protected createLink ( $href, $title, $name, $hreflang ) : |
||
return |
public setEmbedded ( string $rel, |
||
$rel | string | |
$resource | ||
$singular | boolean | |
return |
$hal->setJsonNumericCheck($jsonNumericCheck = self::JSON_NUMERIC_CHECK_OFF);
$hal->setJsonNumericCheck($jsonNumericCheck = self::JSON_NUMERIC_CHECK_ON);
public setJsonNumericCheck ( boolean $jsonNumericCheck = self::JSON_NUMERIC_CHECK_OFF ) : |
||
$jsonNumericCheck | boolean | |
return |
public setXML ( SimpleXMLElement $xml ) : |
||
$xml | SimpleXMLElement | |
return |
protected array $_embedded | ||
return | array |