JSON
class JSON implements ResponseBuilderInterface
JSON builder.
Properties
protected mixed | $data | Data. | |
protected int | $options | JSON encode options. | |
protected string | $callback | Callback. | |
protected int | $status | Status code. |
Methods
__construct(mixed $data, int $options = 0)
Constructor.
asJsonpWith(string $callback)
Enables JSONP support.
string
normalizeCallback(string $callback)
Ensures a valid callback name.