JsonPresenter
class JsonPresenter implements Presentable, Jsonable
JsonPresenter
- API 로 출력할 때 출력방식을 JSON 으로 선택한 경우 동작
Properties
protected Presenter | $presenter | ||
protected string | $id | skin output id | |
protected array | $data | The array of view data. |
Methods
static string
format()
format
array
convert(mixed $data, mixed $key = null)
data convert to array
mixed|string
getObjectToArray(mixed $data)
get object to array
string
toJson(int $options)
return json format string
string
render()
return json format string
array
toArray()
Get the instance as an array.
Details
at line 62
__construct(Presenter $presenter)
Create a new Renderer instance.
at line 72
static string
format()
format
at line 84
private array
convert(mixed $data, mixed $key = null)
data convert to array
at line 107
private mixed|string
getObjectToArray(mixed $data)
get object to array
at line 128
string
toJson(int $options)
return json format string
at line 139
string
render()
return json format string
at line 149
array
toArray()
Get the instance as an array.