Revert "改名"

This reverts commit fdf58326
This commit is contained in:
2022-01-04 16:22:37 +08:00
parent 58a3d91df3
commit 5fd2abcb69
2 changed files with 23 additions and 1 deletions
+22
View File
@@ -16,7 +16,9 @@ use Kiri\Di\Container;
use Kiri\Events\EventProvider;
use Kiri\Kiri;
use Note\Inject;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\ContainerInterface;
use Psr\Container\NotFoundExceptionInterface;
/**
* Class Component
@@ -58,6 +60,26 @@ class Component implements Configure
}
/**
* @return Container|ContainerInterface
*/
#[Pure] public function getContainer(): ContainerInterface|Container
{
return Kiri::getDi();
}
/**
* @return EventProvider
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
public function getEventProvider(): EventProvider
{
return $this->getContainer()->get(EventProvider::class);
}
/**
* @throws Exception
*/