1
|
|
|
<?php namespace Comodojo\Dispatcher\Events; |
2
|
|
|
|
3
|
|
|
use \Comodojo\Foundation\Base\ConfigurationTrait; |
4
|
|
|
use \Comodojo\Foundation\Logging\LoggerTrait; |
5
|
|
|
use \Comodojo\Foundation\Events\EventsTrait; |
6
|
|
|
use \Comodojo\Dispatcher\Traits\CacheTrait; |
7
|
|
|
use \Comodojo\Dispatcher\Traits\RequestTrait; |
8
|
|
|
use \Comodojo\Dispatcher\Traits\ResponseTrait; |
9
|
|
|
use \Comodojo\Dispatcher\Traits\RouterTrait; |
10
|
|
|
use \Comodojo\Dispatcher\Traits\ExtraTrait; |
11
|
|
|
use \Comodojo\Dispatcher\Request\Model as Request; |
12
|
|
|
use \Comodojo\Dispatcher\Router\Model as Router; |
13
|
|
|
use \Comodojo\Dispatcher\Response\Model as Response; |
14
|
|
|
use \Comodojo\Dispatcher\Extra\Model as Extra; |
15
|
|
|
use \Comodojo\Foundation\Events\AbstractEvent; |
16
|
|
|
use \Comodojo\SimpleCache\Manager as CacheManager; |
17
|
|
|
use \Comodojo\Foundation\Events\Manager as EventsManager; |
18
|
|
|
use \Comodojo\Foundation\Base\Configuration; |
19
|
|
|
use \Psr\Log\LoggerInterface; |
20
|
|
|
|
21
|
|
|
/** |
22
|
|
|
* @package Comodojo Dispatcher |
23
|
|
|
* @author Marco Giovinazzi <[email protected]> |
24
|
|
|
* @author Marco Castiello <[email protected]> |
25
|
|
|
* @license MIT |
26
|
|
|
* |
27
|
|
|
* LICENSE: |
28
|
|
|
* |
29
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
30
|
|
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
31
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
32
|
|
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
33
|
|
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
34
|
|
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
35
|
|
|
* THE SOFTWARE. |
36
|
|
|
*/ |
37
|
|
|
|
38
|
|
|
class ServiceEvent extends AbstractEvent { |
39
|
|
|
|
40
|
|
|
use ConfigurationTrait; |
41
|
|
|
use LoggerTrait; |
42
|
|
|
use CacheTrait; |
43
|
|
|
use EventsTrait; |
44
|
|
|
use RequestTrait; |
45
|
|
|
use RouterTrait; |
46
|
|
|
use ResponseTrait; |
47
|
|
|
use ExtraTrait; |
48
|
|
|
|
49
|
1 |
|
public function __construct( |
50
|
|
|
$name, |
51
|
|
|
Configuration $configuration, |
52
|
|
|
LoggerInterface $logger, |
53
|
|
|
CacheManager $cache, |
54
|
|
|
EventsManager $events, |
55
|
|
|
Request $request, |
56
|
|
|
Router $router, |
57
|
|
|
Response $response, |
58
|
|
|
Extra $extra |
59
|
|
|
) { |
60
|
|
|
|
61
|
1 |
|
parent::__construct($name); |
62
|
|
|
|
63
|
1 |
|
$this->setConfiguration($configuration); |
64
|
1 |
|
$this->setLogger($logger); |
65
|
1 |
|
$this->setCache($cache); |
66
|
1 |
|
$this->setEvents($events); |
67
|
1 |
|
$this->setRequest($request); |
68
|
1 |
|
$this->setRouter($router); |
69
|
1 |
|
$this->setResponse($response); |
70
|
1 |
|
$this->setExtra($extra); |
71
|
|
|
|
72
|
1 |
|
} |
73
|
|
|
|
74
|
|
|
} |
75
|
|
|
|