|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
/** |
|
4
|
|
|
* Drush Cerbere command line tools. |
|
5
|
|
|
* Copyright (C) 2015 - Sebastien Malot <[email protected]> |
|
6
|
|
|
* |
|
7
|
|
|
* This program is free software; you can redistribute it and/or modify |
|
8
|
|
|
* it under the terms of the GNU General Public License as published by |
|
9
|
|
|
* the Free Software Foundation; either version 2 of the License, or |
|
10
|
|
|
* (at your option) any later version. |
|
11
|
|
|
* |
|
12
|
|
|
* This program is distributed in the hope that it will be useful, |
|
13
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
14
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
15
|
|
|
* GNU General Public License for more details. |
|
16
|
|
|
* |
|
17
|
|
|
* You should have received a copy of the GNU General Public License along |
|
18
|
|
|
* with this program; if not, write to the Free Software Foundation, Inc., |
|
19
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
|
20
|
|
|
*/ |
|
21
|
|
|
|
|
22
|
|
|
namespace Cerbere\Event; |
|
23
|
|
|
|
|
24
|
|
|
use Cerbere\Action\ActionInterface; |
|
25
|
|
|
use Cerbere\Model\Project; |
|
26
|
|
|
|
|
27
|
|
|
/** |
|
28
|
|
|
* Class CerbereReportActionEvent |
|
29
|
|
|
* @package Cerbere\Event |
|
30
|
|
|
*/ |
|
31
|
|
|
class CerbereReportActionEvent extends CerbereEvent |
|
32
|
|
|
{ |
|
33
|
|
|
/** |
|
34
|
|
|
* @var ActionInterface |
|
35
|
|
|
*/ |
|
36
|
|
|
protected $action; |
|
37
|
|
|
|
|
38
|
|
|
/** |
|
39
|
|
|
* @var Project |
|
40
|
|
|
*/ |
|
41
|
|
|
protected $project; |
|
42
|
|
|
|
|
43
|
|
|
/** |
|
44
|
|
|
* @var array |
|
45
|
|
|
*/ |
|
46
|
|
|
protected $report; |
|
47
|
|
|
|
|
48
|
|
|
/** |
|
49
|
|
|
* @var array |
|
50
|
|
|
*/ |
|
51
|
|
|
protected $options; |
|
52
|
|
|
|
|
53
|
|
|
/** |
|
54
|
|
|
* @param ActionInterface $action |
|
55
|
|
|
* @param Project $project |
|
56
|
|
|
* @param array $report |
|
57
|
|
|
* @param array $options |
|
58
|
|
|
*/ |
|
59
|
|
|
public function __construct(ActionInterface $action, Project $project, $report, $options = array()) |
|
60
|
|
|
{ |
|
61
|
|
|
$this->action = $action; |
|
62
|
|
|
$this->project = $project; |
|
63
|
|
|
$this->report = $report; |
|
64
|
|
|
$this->options = $options; |
|
65
|
|
|
} |
|
66
|
|
|
|
|
67
|
|
|
/** |
|
68
|
|
|
* @return ActionInterface |
|
69
|
|
|
*/ |
|
70
|
|
|
public function getAction() |
|
71
|
|
|
{ |
|
72
|
|
|
return $this->action; |
|
73
|
|
|
} |
|
74
|
|
|
|
|
75
|
|
|
/** |
|
76
|
|
|
* @param ActionInterface $action |
|
77
|
|
|
*/ |
|
78
|
|
|
public function setAction($action) |
|
79
|
|
|
{ |
|
80
|
|
|
$this->action = $action; |
|
81
|
|
|
} |
|
82
|
|
|
|
|
83
|
|
|
/** |
|
84
|
|
|
* @return Project |
|
85
|
|
|
*/ |
|
86
|
|
|
public function getProject() |
|
87
|
|
|
{ |
|
88
|
|
|
return $this->project; |
|
89
|
|
|
} |
|
90
|
|
|
|
|
91
|
|
|
/** |
|
92
|
|
|
* @param Project $project |
|
93
|
|
|
*/ |
|
94
|
|
|
public function setProject($project) |
|
95
|
|
|
{ |
|
96
|
|
|
$this->project = $project; |
|
97
|
|
|
} |
|
98
|
|
|
|
|
99
|
|
|
/** |
|
100
|
|
|
* @return array |
|
101
|
|
|
*/ |
|
102
|
|
|
public function getReport() |
|
103
|
|
|
{ |
|
104
|
|
|
return $this->report; |
|
105
|
|
|
} |
|
106
|
|
|
|
|
107
|
|
|
/** |
|
108
|
|
|
* @param array $report |
|
109
|
|
|
*/ |
|
110
|
|
|
public function setReport($report) |
|
111
|
|
|
{ |
|
112
|
|
|
$this->report = $report; |
|
113
|
|
|
} |
|
114
|
|
|
|
|
115
|
|
|
/** |
|
116
|
|
|
* @return array |
|
117
|
|
|
*/ |
|
118
|
|
|
public function getOptions() |
|
119
|
|
|
{ |
|
120
|
|
|
return $this->options; |
|
121
|
|
|
} |
|
122
|
|
|
|
|
123
|
|
|
/** |
|
124
|
|
|
* @param array $options |
|
125
|
|
|
*/ |
|
126
|
|
|
public function setOptions($options) |
|
127
|
|
|
{ |
|
128
|
|
|
$this->options = $options; |
|
129
|
|
|
} |
|
130
|
|
|
} |
|
131
|
|
|
|