1: <?php declare(strict_types=1);
2:
3: namespace Salient\Container\Event;
4:
5: use Salient\Contract\Container\BeforeGlobalContainerSetEventInterface;
6: use Salient\Contract\Container\ContainerInterface;
7:
8: /**
9: * Dispatched before the global container is set or unset
10: */
11: class BeforeGlobalContainerSetEvent extends AbstractContainerEvent implements BeforeGlobalContainerSetEventInterface
12: {
13: protected ?ContainerInterface $Container;
14:
15: public function __construct(?ContainerInterface $container)
16: {
17: $this->Container = $container;
18: }
19:
20: /**
21: * @inheritDoc
22: */
23: public function getContainer(): ?ContainerInterface
24: {
25: return $this->Container;
26: }
27: }
28: