DataObject
abstract class DataObject implements Arrayable, Jsonable, JsonSerializable, RequestCastable, Transient
Constants
| private KIND_PASSTHROUGH |
|
| private KIND_ARRAY |
|
| private KIND_BOOLEAN |
|
| private KIND_FLOAT |
|
| private KIND_INTEGER |
|
| private KIND_STRING |
|
| private KIND_ENUM |
|
| private KIND_DATA_OBJECT |
|
| private KIND_DATE |
|
Methods
static DataObject
from(array $data)
Create a new data object from the given values.
static CastsRequestInput|string
castRequestUsing(array $arguments)
Get the caster to use for validated request input.
array
toArray()
Convert the data object to an array.
array
jsonSerialize()
Convert the object into something JSON serializable.
string
toJson(int $options = 0)
Convert the data object to JSON.
static void
flushState()
Flush all static state.
Details
at line 67
static DataObject
from(array $data)
Create a new data object from the given values.
at line 112
static CastsRequestInput|string
castRequestUsing(array $arguments)
Get the caster to use for validated request input.
at line 126
array
toArray()
Convert the data object to an array.
at line 144
array
jsonSerialize()
Convert the object into something JSON serializable.
at line 154
string
toJson(int $options = 0)
Convert the data object to JSON.
at line 415
static void
flushState()
Flush all static state.