BeforeUpdate extends Payload
Notice emitted before a document is updated.
Example:
$notice = new BeforeUpdate
(
target : $this,
context : $init
);
$signal->emit( $notice ) ;
Tags
Table of Contents
Properties
- $context : array<string|int, mixed>
- The context of the notice
- $data : string
- The message of the notice
- $target : mixed
- The target of the notice.
- $type : mixed
- The type of the notice.
Methods
- __construct() : mixed
- Creates a new BeforeUpdate instance.
- jsonSerialize() : array<string|int, mixed>
- Serializes the current object into a JSON array.
- toArray() : array<string|int, mixed>
- Returns the array representation of the notice object.
Properties
$context
The context of the notice
public
array<string|int, mixed>
$context
$data
The message of the notice
public
string
$data
$target
The target of the notice.
public
mixed
$target
$type
The type of the notice.
public
mixed
$type
Methods
__construct()
Creates a new BeforeUpdate instance.
public
__construct([mixed|null $data = null ][, object|null $target = null ][, array<string|int, mixed> $context = [] ]) : mixed
Parameters
- $data : mixed|null = null
-
The document(s) or value updated.
- $target : object|null = null
-
The target of the notice.
- $context : array<string|int, mixed> = []
-
The context of the notice.
jsonSerialize()
Serializes the current object into a JSON array.
public
jsonSerialize() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —JSON-LD representation of the object.
toArray()
Returns the array representation of the notice object.
public
toArray() : array<string|int, mixed>