Revert "改名"
This reverts commit fdf58326
This commit is contained in:
@@ -16,7 +16,9 @@ use Kiri\Di\Container;
|
|||||||
use Kiri\Events\EventProvider;
|
use Kiri\Events\EventProvider;
|
||||||
use Kiri\Kiri;
|
use Kiri\Kiri;
|
||||||
use Note\Inject;
|
use Note\Inject;
|
||||||
|
use Psr\Container\ContainerExceptionInterface;
|
||||||
use Psr\Container\ContainerInterface;
|
use Psr\Container\ContainerInterface;
|
||||||
|
use Psr\Container\NotFoundExceptionInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class Component
|
* 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
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ use Psr\Container\ContainerInterface;
|
|||||||
* Class Container
|
* Class Container
|
||||||
* @package Kiri\Di
|
* @package Kiri\Di
|
||||||
*/
|
*/
|
||||||
class Container extends Component implements ContainerInterface
|
class Container implements ContainerInterface
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user