| 1 | <?php |
||
| 12 | class Kernel |
||
| 13 | { |
||
| 14 | public const VERSION = '2.0'; |
||
| 15 | |||
| 16 | private $container; |
||
| 17 | |||
| 18 | /** @var Channel|null */ |
||
| 19 | private $channel; |
||
| 20 | |||
| 21 | /** @var Context|null */ |
||
| 22 | private $context; |
||
| 23 | |||
| 24 | public function __construct(Container $container) |
||
| 28 | |||
| 29 | /** |
||
| 30 | * Initialize kernel. |
||
| 31 | * |
||
| 32 | * @param Channel $channel |
||
| 33 | */ |
||
| 34 | public function initialize(Channel $channel): void |
||
| 40 | |||
| 41 | /** |
||
| 42 | * Get current channel. |
||
| 43 | * |
||
| 44 | * @return Channel|null |
||
| 45 | */ |
||
| 46 | public function getChannel(): ?Channel |
||
| 50 | |||
| 51 | /** |
||
| 52 | * Get context. |
||
| 53 | * |
||
| 54 | * @return Context|null |
||
| 55 | */ |
||
| 56 | public function getContext(): ?Context |
||
| 60 | |||
| 61 | /** |
||
| 62 | * Set context. |
||
| 63 | * |
||
| 64 | * @param Context $context |
||
| 65 | */ |
||
| 66 | public function setContext(Context $context): void |
||
| 70 | } |
||
| 71 |