EventImmutable
Extends \Joomla\Event\AbstractEventImplementation of an immutable Event.
An immutable event cannot be modified after instanciation :
- its propagation cannot be stopped
- its arguments cannot be modified
You may want to use this event when you want to ensure that the listeners won't manipulate it.
since |
1.0 |
---|
Methods
__construct
Constructor.
__construct(string $name, array $arguments = array())
since |
1.0 |
---|
Arguments
- $name
string
The event name.- $arguments
array
The event arguments.
count
Count the number of arguments.
count() : integer
since |
1.0 |
---|
Response
integer
The number of arguments.
getArgument
Get an event argument value.
getArgument(string $name, mixed $default = null) : mixed
since |
1.0 |
---|
Arguments
- $name
string
The argument name.- $default
mixed
The default value if not found.
Response
mixed
The argument value or the default value.
getArguments
Get all event arguments.
getArguments() : array
since |
1.0 |
---|
Response
array
An associative array of argument names as keys
and their values as values.
getName
Get the event name.
getName() : string
since |
1.0 |
---|
Response
string
The event name.
hasArgument
Tell if the given event argument exists.
hasArgument(string $name) : boolean
since |
1.0 |
---|
Arguments
- $name
string
The argument name.
Response
boolean
True if it exists, false otherwise.
isStopped
Tell if the event propagation is stopped.
isStopped() : boolean
since |
1.0 |
---|
Response
boolean
True if stopped, false otherwise.
offsetExists
Tell if the given event argument exists.
offsetExists(string $name) : boolean
since |
1.0 |
---|
Arguments
- $name
string
The argument name.
Response
boolean
True if it exists, false otherwise.
offsetGet
Get an event argument value.
offsetGet(string $name) : mixed
since |
1.0 |
---|
Arguments
- $name
string
The argument name.
Response
mixed
The argument value or null if not existing.
offsetSet
Set the value of an event argument.
offsetSet(string $name, mixed $value) : void
throws |
|
---|---|
since |
1.0 |
Arguments
- $name
string
The argument name.- $value
mixed
The argument value.
offsetUnset
Remove an event argument.
offsetUnset(string $name) : void
throws |
|
---|---|
since |
1.0 |
Arguments
- $name
string
The argument name.
serialize
Serialize the event.
serialize() : string
since |
1.0 |
---|
Response
string
The serialized event.
unserialize
Unserialize the event.
unserialize(string $serialized) : void
since |
1.0 |
---|
Arguments
- $serialized
string
The serialized event.
Properties
constructed
A flag to see if the constructor has been already called.
Type(s)
boolean
name
The event name.
since |
1.0 |
---|
Type(s)
string
arguments
The event arguments.
since |
1.0 |
---|
Type(s)
array
stopped
A flag to see if the event propagation is stopped.
since |
1.0 |
---|
Type(s)
boolean