PHP Class FOF30\Hal\Render\Json

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

Protected Properties

Свойство Type Description
$_document FOF30\Hal\Document The document to render

Méthodes publiques

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

Méthodes protégées

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

Method Details

__construct() public méthode

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

render() public méthode

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)
Résultat string The JSON representation of the HAL document

Property Details

$_document protected_oe property

The document to render
protected Document,FOF30\Hal $_document
Résultat FOF30\Hal\Document