Template
class Template extends ReactiveObject implements Responsable
Traits
Properties
protected array | $hooks | from Hooks | |
protected Event[] | $eventHandlers | from Events | |
protected array | $timestamps | ||
protected array | $attributes | from Accessors | |
array | $modified | from Accessors | |
ReactiveObject|ItemCollection|null | $parent | from ReactiveObject | |
protected array | $defaults | from ReactiveObject | |
protected array | $readOnlyAttributes | from ReactiveObject |
Methods
on(string $eventName, callable $handler = null)
Attaches an event handler for a given event
from
Events
void
trigger(string $eventName, mixed $payload = null)
Invokes the event handlers for the given event
from
Events
__construct(object|array $attributes = [], object|null $parent = null)
No description
from
ReactiveObject
setParent(ReactiveObject|ItemCollection|null $parent)
No description
from
ReactiveObject
static ReactiveObject
factory(object|array $attributes = [], object|null $parent = null)
No description
from
ReactiveObject
Collection
getAreasAttribute(array $areas = [])
No description
string|null
getAliasAttribute(string|null $alias)
No description
setAliasAttribute(string|null $alias)
No description
Response
toResponse(array $variables = [])
Create an HTTP response that represents the object.
Details
in
Hooks at line 30
void
performHook(string $name)
in
Hooks at line 40
void
performHooks()
in
Events at line 17
Events
on(string $eventName, callable $handler = null)
Attaches an event handler for a given event
in
Events at line 43
void
emit(string $event, mixed $payload = null)
Emits an event to parent
in
Events at line 57
void
trigger(string $eventName, mixed $payload = null)
Invokes the event handlers for the given event
in
Timestamps at line 18
serializeTimestamp($value)
in
Accessors at line 30
array
toArray()
Get the raw attributes
in
Accessors at line 39
mixed
__get(string $property)
in
Accessors at line 67
__set(string $property, mixed $value)
in
Accessors at line 97
bool
__isset(string $property)
in
Accessors at line 105
__unset(string $key)
in
Accessors at line 116
bool
offsetExists(string $property)
in
Accessors at line 127
mixed
offsetGet(string $property)
in
Accessors at line 137
mixed
offsetSet(string $property, mixed $value)
in
Accessors at line 146
void
offsetUnset(string $key)
in
Accessors at line 154
string
__toString()
in
ReactiveObject at line 30
__construct(object|array $attributes = [], object|null $parent = null)
in
ReactiveObject at line 53
ReactiveObject
setParent(ReactiveObject|ItemCollection|null $parent)
in
ReactiveObject at line 62
ReactiveObject|ItemCollection|null
getParent()
in
ReactiveObject at line 70
ReactiveObject|ItemCollection|null
getRootParent()
in
ReactiveObject at line 85
int
getIdAttribute(string|int $id = null)
in
ReactiveObject at line 93
array
__debugInfo()
in
ReactiveObject at line 109
static ReactiveObject
factory(object|array $attributes = [], object|null $parent = null)
in
ReactiveObject at line 117
array
jsonSerialize()
in
ReactiveObject at line 142
static
hasTrait($trait)
at line 21
static Template|null
get($id)
at line 32
Collection
getAreasAttribute(array $areas = [])
at line 41
string|null
getAliasAttribute(string|null $alias)
at line 50
setAliasAttribute(string|null $alias)
at line 64
Response
toResponse(array $variables = [])
Create an HTTP response that represents the object.