Serializable
Automatically serializes an Arrayable implementation when JSON is requested.
Tags
Table of Contents
Methods
- arraySerialize() : array<string|int, mixed>
- Recursively serialize Arrayables
- jsonSerialize() : array<string|int, mixed>
- toArray() : array<string|int, mixed>
- Default implementation to dynamically serialize all public properties. Can be overridden for increased control.
- toJson() : string
- automaticallySerialize() : array<string|int, mixed>
- Automatically serialize all public properties.
Methods
arraySerialize()
Recursively serialize Arrayables
public
arraySerialize() : array<string|int, mixed>
Return values
array<string|int, mixed>jsonSerialize()
public
jsonSerialize() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>toArray()
Default implementation to dynamically serialize all public properties. Can be overridden for increased control.
public
toArray() : array<string|int, mixed>
Return values
array<string|int, mixed>toJson()
public
toJson([int $options = 0 ]) : string
Parameters
- $options : int = 0
Return values
stringautomaticallySerialize()
Automatically serialize all public properties.
protected
automaticallySerialize() : array<string|int, mixed>