PHP Class FOF30\Hal\Render\Json

See also: http://stateless.co/hal_specification.html
Inheritance: implements FOF30\Hal\Render\RenderInterface
Datei anzeigen Open project: akeeba/fof Class Usage Examples

Protected Properties

Property Type Description
$_document FOF30\Hal\Document The document to render

Public Methods

Method Description
__construct ( Document &$document ) Public constructor
render ( array $options = [] ) : string Render a HAL document in JSON format

Protected Methods

Method Description
_getLink ( Link $link ) : stdClass Converts a FOFHalLink object into a stdClass object which will be used for JSON serialisation

Method Details

__construct() public method

Public constructor
public __construct ( Document &$document )
$document FOF30\Hal\Document

render() public method

Render a HAL document in JSON format
public render ( array $options = [] ) : string
$options array Rendering options. You can currently only set json_options (json_encode options)
return string The JSON representation of the HAL document

Property Details

$_document protected_oe property

The document to render
protected Document,FOF30\Hal $_document
return FOF30\Hal\Document