Controller
class Controller extends Controller
控制器
Properties
ContainerInterface | $container | from Component | |
EventManagerInterface | $events | from Component | |
Dispatcher | $dispatcher | ||
RouterInterface | $router | from Controller | |
Request | $request | ||
Response | $response | ||
Session | $session | ||
Flash | $flash | ||
ViewInterface | $view |
Methods
Details
in Component at line 24
setContainer(ContainerInterface $container)
设置依赖注入容器
in Component at line 29
ContainerInterface
getContainer()
获取依赖注入容器
in Component at line 43
listen(string $name, object $listener)
监听某个事件
in Component at line 63
bool
trigger(string|EventInterface $event, mixed $data = null)
触发事件
$this->trigger(App::ON_BOOT, $data); $event = new Event(App::ON_FINISH, $data); $this->trigger($event);
in Component at line 74
ContainerInterface|mixed
__get(string $name)
获取容器中的某个服务