interfaces接口
目录结构
├─interfaces
│ JobInterface.php
│ ListenerInterface.php
│ MiddlewareInterface.php
- JobInterface 属于消息队列接口类
ListenerInterface 属于事件监听接口类
创建一个事件监听类,并且必须完成handle
方法
```
<?php
crmeb\listeners;
use crmeb\interfaces\ListenerInterface;
class UserListener implements ListenerInterface
{
public function handle($event){
}
}
## 注册UserListener事件
注册容器地址:\app\adminapi\event.php
return [
‘listen’ => [
‘AppInit’ => [],
‘HttpRun’ => [],
‘HttpEnd’ => [],
‘LogLevel’ =&g