Class CacheAfterDeleteEvent
Class Cache AfterDelete Event
Constants
-
NAME ¶
'Cache.afterDelete'
Property Summary
Method Summary
-
__construct() public
Constructor
-
getData() public
Accesses the event data/payload.
-
getKey() public
-
getName() public
Returns the name of this event. This is usually used as the event identifier
-
getResult() public
The result value of the event listeners
-
getSubject() public
Returns the subject of this event
If the event has no subject an exception will be raised.
-
isStopped() public
Check if the event is stopped
-
setData() public
Assigns a value to the data/payload of this event.
-
setResult() public
Listeners can attach a result value to the event.
-
stopPropagation() public
Stops the event from being used anymore
Method Detail
__construct() ¶ public
__construct(string $name, TEngine $subject, array $data = [])
Constructor
Parameters
-
string$name Name of the event
-
TEngine$subject The Cache engine instance this event applies to.
-
array$data optional Any value you wish to be transported with this event to it can be read by listeners.
getData() ¶ public
getData(string|null $key = null): $key is null ? array : mixed
Accesses the event data/payload.
Parameters
-
string|null$key optional
Returns
$key is null ? array : mixedgetName() ¶ public
getName(): string
Returns the name of this event. This is usually used as the event identifier
Returns
stringgetResult() ¶ public
getResult(): bool|null
The result value of the event listeners
Returns
bool|nullgetSubject() ¶ public
getSubject(): TSubject|null
Returns the subject of this event
If the event has no subject an exception will be raised.
Returns
TSubject|nullThrows
Cake\Core\Exception\CakeExceptionisStopped() ¶ public
isStopped(): bool
Check if the event is stopped
Returns
boolTrue if the event is stopped
setData() ¶ public
setData(array|string $key, mixed $value = null): $this
Assigns a value to the data/payload of this event.
Parameters
-
array|string$key -
mixed$value optional
Returns
$thissetResult() ¶ public
setResult(mixed $value = null): $this
Listeners can attach a result value to the event.
Parameters
-
mixed$value optional The value to set.
Returns
$thisstopPropagation() ¶ public
stopPropagation(): void
Stops the event from being used anymore
Returns
void