class Data extends ReactiveObject

Traits

Properties

protected array $hooks from  Hooks
protected Event[] $eventHandlers from  Events
protected array $timestamps from  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

addHook(string $name, callable $callback = null)

No description

from  Hooks
void
performHook(string $name)

No description

from  Hooks
void
performHooks()

No description

from  Hooks
on(string $eventName, callable $handler = null)

Attaches an event handler for a given event

from  Events
addEvent(Event $event)

Attaches an Event directly

from  Events
void
emit(string $event, mixed $payload = null)

Emits an event to parent

from  Events
void
trigger(string $eventName, mixed $payload = null)

Invokes the event handlers for the given event

from  Events
serializeTimestamp($value)

No description

array
toArray()

Get the raw attributes

mixed
__get(string $property)

No description

__set(string $property, mixed $value)

No description

bool
__isset(string $property)

No description

__unset(string $key)

No description

bool
offsetExists(string $property)

No description

mixed
offsetGet(string $property)

No description

mixed
offsetSet(string $property, mixed $value)

No description

void
offsetUnset(string $key)

No description

string
__toString()

No description

__construct(object|array $attributes = [], object|null $parent = null)

No description

setParent(ReactiveObject|ItemCollection|null $parent)

No description

ReactiveObject|ItemCollection|null
getParent()

No description

ReactiveObject|ItemCollection|null
getRootParent()

No description

int
getIdAttribute(string|int $id = null)

No description

array
__debugInfo()

No description

static ReactiveObject
factory(object|array $attributes = [], object|null $parent = null)

No description

array
jsonSerialize()

No description

static 
hasTrait($trait)

No description

delete($key)

No description

from  DataAPI

Details

in Hooks at line 15
Hooks addHook(string $name, callable $callback = null)

Parameters

string $name
callable $callback

Return Value

Hooks

in Hooks at line 30
void performHook(string $name)

Parameters

string $name

Return Value

void

in Hooks at line 40
void performHooks()

Return Value

void

in Events at line 17
Events on(string $eventName, callable $handler = null)

Attaches an event handler for a given event

Parameters

string $eventName
callable $handler

Return Value

Events

in Events at line 30
Events addEvent(Event $event)

Attaches an Event directly

Parameters

Event $event

Return Value

Events

in Events at line 43
void emit(string $event, mixed $payload = null)

Emits an event to parent

Parameters

string $event
mixed $payload = null

Return Value

void

in Events at line 57
void trigger(string $eventName, mixed $payload = null)

Invokes the event handlers for the given event

Parameters

string $eventName
mixed $payload = null

Return Value

void

in Timestamps at line 18
serializeTimestamp($value)

Parameters

$value

in Accessors at line 30
array toArray()

Get the raw attributes

Return Value

array

in Accessors at line 39
mixed __get(string $property)

Parameters

string $property

Return Value

mixed

in Accessors at line 67
__set(string $property, mixed $value)

Parameters

string $property
mixed $value

in Accessors at line 97
bool __isset(string $property)

Parameters

string $property

Return Value

bool

in Accessors at line 105
__unset(string $key)

Parameters

string $key

in Accessors at line 116
bool offsetExists(string $property)

Parameters

string $property

Return Value

bool

in Accessors at line 127
mixed offsetGet(string $property)

Parameters

string $property

Return Value

mixed

in Accessors at line 137
mixed offsetSet(string $property, mixed $value)

Parameters

string $property
mixed $value

Return Value

mixed

in Accessors at line 146
void offsetUnset(string $key)

Parameters

string $key

Return Value

void

in Accessors at line 154
string __toString()

Return Value

string

in ReactiveObject at line 30
__construct(object|array $attributes = [], object|null $parent = null)

Parameters

object|array $attributes = []
object|null $parent = null

in ReactiveObject at line 53
ReactiveObject setParent(ReactiveObject|ItemCollection|null $parent)

Parameters

ReactiveObject|ItemCollection|null $parent

Return Value

ReactiveObject

in ReactiveObject at line 62
ReactiveObject|ItemCollection|null getParent()

Return Value

ReactiveObject|ItemCollection|null

in ReactiveObject at line 70
ReactiveObject|ItemCollection|null getRootParent()

Return Value

ReactiveObject|ItemCollection|null

in ReactiveObject at line 85
int getIdAttribute(string|int $id = null)

Parameters

string|int $id

Return Value

int

in ReactiveObject at line 93
array __debugInfo()

Return Value

array

in ReactiveObject at line 109
static ReactiveObject factory(object|array $attributes = [], object|null $parent = null)

Parameters

object|array $attributes = []
object|null $parent = null

Return Value

ReactiveObject

in ReactiveObject at line 117
array jsonSerialize()

Return Value

array

in ReactiveObject at line 142
static hasTrait($trait)

Parameters

$trait

in DataAPI at line 15
delete($key)

Parameters

$key

Exceptions

Exception