PHP Класс FOF30\Hal\Render\Json

См. также: http://stateless.co/hal_specification.html
Наследование: implements FOF30\Hal\Render\RenderInterface
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$_document FOF30\Hal\Document The document to render

Открытые методы

Метод Описание
__construct ( Document &$document ) Public constructor
render ( array $options = [] ) : string Render a HAL document in JSON format

Защищенные методы

Метод Описание
_getLink ( Link $link ) : stdClass Converts a FOFHalLink object into a stdClass object which will be used for JSON serialisation

Описание методов

__construct() публичный Метод

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

render() публичный Метод

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)
Результат string The JSON representation of the HAL document

Описание свойств

$_document защищенное свойство

The document to render
protected Document,FOF30\Hal $_document
Результат FOF30\Hal\Document