1
|
|
|
<?php |
2
|
|
|
declare(strict_types = 1); |
3
|
|
|
/** |
4
|
|
|
* Copyright (C) 2015 Alexander Schmidt |
5
|
|
|
* |
6
|
|
|
* This program is free software: you can redistribute it and/or modify |
7
|
|
|
* it under the terms of the GNU General Public License as published by |
8
|
|
|
* the Free Software Foundation, either version 3 of the License, or |
9
|
|
|
* (at your option) any later version. |
10
|
|
|
* |
11
|
|
|
* This program is distributed in the hope that it will be useful, |
12
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
13
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14
|
|
|
* GNU General Public License for more details. |
15
|
|
|
* |
16
|
|
|
* You should have received a copy of the GNU General Public License |
17
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
18
|
|
|
* @author Alexander Schmidt <[email protected]> |
19
|
|
|
* @copyright Copyright (c) 2015, Alexander Schmidt |
20
|
|
|
* @date 03.10.2015 |
21
|
|
|
*/ |
22
|
|
|
|
23
|
|
|
require_once __DIR__ . '/vendor/autoload.php'; |
24
|
|
|
require_once __DIR__ . '/configuration/env.php'; |
25
|
|
|
|
26
|
|
|
// Create EventDispatcher |
27
|
|
|
$eventDispatcher = new \AValnar\EventDispatcher\EventDispatcherImpl(); |
28
|
|
|
$eventDispatcher->addSubscriber(new \Bonefish\Bootstrap\BootSubscriber($eventDispatcher)); |
29
|
|
|
|
30
|
|
|
$eventDispatcher->addListener( |
|
|
|
|
31
|
|
|
function ($events) use ($eventDispatcher) { |
32
|
|
|
/** @var \Bonefish\Injection\Container\Container $container */ |
33
|
|
|
$container = $events[\Bonefish\Events::CONTAINER_SETUP]->getObject(); |
34
|
|
|
$eventDispatcher->addSubscriber($container->get(\Bonefish\Request\RequestSubscriber::class)); |
35
|
|
|
$eventDispatcher->dispatch(\Bonefish\Events::REQUEST_INIT); |
36
|
|
|
}, |
37
|
|
|
\AValnar\EventDispatcher\EventDispatcher::USE_LAST, |
38
|
|
|
\Bonefish\Events::CONTAINER_SETUP |
39
|
|
|
); |
40
|
|
|
|
41
|
|
|
$eventDispatcher->dispatch(\Bonefish\Events::BOOT_INIT); |
This method has been deprecated. The supplier of the class has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the method will be removed from the class and what other method or class to use instead.