1 | <?php |
||
7 | class Application extends Container |
||
8 | { |
||
9 | const NAME = "Wandu"; |
||
10 | const VERSION = "3.1-dev"; |
||
11 | |||
12 | /** @var \Wandu\Foundation\Contracts\KernelInterface */ |
||
13 | protected $kernel; |
||
14 | |||
15 | /** @var \Wandu\Foundation\Application */ |
||
16 | public static $app; |
||
17 | |||
18 | /** |
||
19 | * @param \Wandu\Foundation\Contracts\KernelInterface $kernel |
||
20 | */ |
||
21 | 4 | public function __construct(KernelInterface $kernel) |
|
28 | |||
29 | /** |
||
30 | * {@inheritdoc} |
||
31 | */ |
||
32 | public function boot() |
||
33 | { |
||
34 | if (!$this->isBooted) { |
||
35 | $this->kernel->boot($this); |
||
36 | parent::boot(); |
||
37 | } |
||
38 | return $this; |
||
39 | } |
||
40 | |||
41 | /** |
||
42 | * @return mixed |
||
43 | */ |
||
44 | public function execute() |
||
49 | |||
50 | /** |
||
51 | * @return \Wandu\Foundation\Application |
||
52 | */ |
||
53 | 4 | public function setAsGlobal() |
|
59 | } |
||
60 |