ApplicationEvent
扩展 Event应用程序事件的基本事件类。
| 自 | 2.0.0 | 
|---|---|
| 包 | Joomla 框架 | 
方法
__construct
事件构造函数。
__construct( name, \Joomla\Application\AbstractApplication application) :
__serialize
序列化事件。
__serialize() : mixed||string|int
| 自 | 2.0.0 | 
|---|
响应
array<string|int, mixed>要序列化的数据
__unserialize
反序列化事件。
__unserialize(mixed||string|int data) :
| 自 | 2.0.0 | 
|---|
参数
- data
- array<string|int, mixed>序列化的事件。
响应
空
addArgument
添加事件参数,仅当它不存在时。
addArgument( name, value) :
| 自 | 1.0 | 
|---|
参数
- name
- string参数名称。
- value
- mixed参数值。
响应
$this
clearArguments
清除所有事件参数。
clearArguments() : mixed||string|int
| 自 | 1.0 | 
|---|
响应
array<string|int, mixed>旧的参数。
count
计算参数的数量。
count() :
| 自 | 1.0 | 
|---|
响应
int参数的数量。
getApplication
获取活动应用程序。
getApplication() : \Joomla\Application\AbstractApplication
getArgument
获取事件参数值。
getArgument( name, default = null) :
| 自 | 1.0 | 
|---|
参数
- name
- string参数名称。
- default
- mixed如果未找到,则为默认值。
响应
mixed参数值或默认值。
getArguments
获取所有事件参数。
getArguments() : mixed||string|int
| 自 | 1.0 | 
|---|
响应
array<string|int, mixed>一个关联数组,参数名称作为键,其值作为值。
getName
获取事件名称。
getName() :
| 自 | 1.0 | 
|---|
响应
string事件名称。
hasArgument
告知给定的事件参数是否存在。
hasArgument( name) :
| 自 | 1.0 | 
|---|
参数
- name
- string参数名称。
响应
bool如果存在,则为真,否则为假。
isStopped
告知事件传播是否已停止。
isStopped() :
| 自 | 1.0 | 
|---|
响应
bool如果已停止,则为真,否则为假。
offsetExists
告知给定的事件参数是否存在。
offsetExists( name) :
| 自 | 1.0 | 
|---|
参数
- name
- string参数名称。
响应
bool如果存在,则为真,否则为假。
offsetGet
获取事件参数值。
offsetGet( name) :
| 自 | 1.0 | 
|---|
参数
- name
- string参数名称。
响应
mixed参数值,如果不存在则为 null。
offsetSet
设置事件参数的值。
offsetSet( name, value) :
| 自 | 1.0 | 
|---|---|
| 抛出 | 
 | 
参数
- name
- string参数名称。
- value
- mixed参数值。
响应
空
offsetUnset
移除事件参数。
offsetUnset( name) :
| 自 | 1.0 | 
|---|
参数
- name
- string参数名称。
响应
空
removeArgument
移除事件参数。
removeArgument( name) :
| 自 | 1.0 | 
|---|
参数
- name
- string参数名称。
响应
mixed旧的参数值,如果不存在则为 null。
serialize
序列化事件。
serialize() :
| 自 | 1.0 | 
|---|
响应
string序列化的事件。
setArgument
向事件添加参数。
setArgument( name, value) :
| 自 | 1.0 | 
|---|
参数
- name
- string参数名称。
- value
- mixed值。
响应
$this
stop
停止事件传播。
stop() :
| 自 | 1.0 | 
|---|---|
| 已弃用 | 3.0 使用 stopPropagation 代替 | 
响应
空
stopPropagation
停止将事件传播到后续的事件侦听器。
stopPropagation() :
| 自 | 2.0.0 | 
|---|
响应
空
unserialize
反序列化事件。
unserialize( serialized) :
| 自 | 1.0 | 
|---|
参数
- 序列化
- string序列化的事件。
响应
空
属性
name
事件名称。
| 自 | 1.0 | 
|---|
类型
字符串
            arguments
事件参数。
| 自 | 1.0 | 
|---|
类型
array<string|int, mixed>
            stopped
一个标志,用于查看事件传播是否已停止。
| 自 | 1.0 | 
|---|
类型
布尔值