get(EventDispatch::class); } public function getProvider(): EventProvider { return Kiri::getDi()->get(EventProvider::class); } public function getContainer(): ContainerInterface { return Kiri::getDi(); } /** * @throws */ public function __get(string $name) { $method = 'get' . ucfirst($name); if (method_exists($this, $method)) { return $this->{$method}(); } throw new Exception('Unable getting property ' . get_called_class() . '::' . $name); } }