@@ 33-124 (lines=92) @@ | ||
30 | * Class CerberePostActionEvent |
|
31 | * @package Cerbere\Event |
|
32 | */ |
|
33 | class CerberePostActionEvent extends CerbereEvent |
|
34 | { |
|
35 | /** |
|
36 | * @var Cerbere |
|
37 | */ |
|
38 | protected $cerbere; |
|
39 | ||
40 | /** |
|
41 | * @var Job |
|
42 | */ |
|
43 | protected $job; |
|
44 | ||
45 | /** |
|
46 | * @var ActionInterface |
|
47 | */ |
|
48 | protected $action; |
|
49 | ||
50 | /** |
|
51 | * @var Project[] |
|
52 | */ |
|
53 | protected $projects; |
|
54 | ||
55 | /** |
|
56 | * @param Cerbere $cerbere |
|
57 | * @param Job $job |
|
58 | * @param ActionInterface $action |
|
59 | * @param Project[] $projects |
|
60 | */ |
|
61 | public function __construct(Cerbere $cerbere, Job $job, ActionInterface $action, $projects = array()) |
|
62 | { |
|
63 | $this->cerbere = $cerbere; |
|
64 | $this->job = $job; |
|
65 | $this->action = $action; |
|
66 | $this->projects = $projects; |
|
67 | } |
|
68 | ||
69 | /** |
|
70 | * @return ActionInterface |
|
71 | */ |
|
72 | public function getAction() |
|
73 | { |
|
74 | return $this->action; |
|
75 | } |
|
76 | ||
77 | /** |
|
78 | * @param ActionInterface $action |
|
79 | */ |
|
80 | public function setAction($action) |
|
81 | { |
|
82 | $this->action = $action; |
|
83 | } |
|
84 | ||
85 | /** |
|
86 | * @return Cerbere |
|
87 | */ |
|
88 | public function getCerbere() |
|
89 | { |
|
90 | return $this->cerbere; |
|
91 | } |
|
92 | ||
93 | /** |
|
94 | * @return Job |
|
95 | */ |
|
96 | public function getJob() |
|
97 | { |
|
98 | return $this->job; |
|
99 | } |
|
100 | ||
101 | /** |
|
102 | * @param Job $job |
|
103 | */ |
|
104 | public function setJob($job) |
|
105 | { |
|
106 | $this->job = $job; |
|
107 | } |
|
108 | ||
109 | /** |
|
110 | * @return Project[] |
|
111 | */ |
|
112 | public function getProjects() |
|
113 | { |
|
114 | return $this->projects; |
|
115 | } |
|
116 | ||
117 | /** |
|
118 | * @param Project[] $projects |
|
119 | */ |
|
120 | public function setProjects($projects) |
|
121 | { |
|
122 | $this->projects = $projects; |
|
123 | } |
|
124 | } |
|
125 |
@@ 33-124 (lines=92) @@ | ||
30 | * Class CerberePreActionEvent |
|
31 | * @package Cerbere\Event |
|
32 | */ |
|
33 | class CerberePreActionEvent extends CerbereEvent |
|
34 | { |
|
35 | /** |
|
36 | * @var Cerbere |
|
37 | */ |
|
38 | protected $cerbere; |
|
39 | ||
40 | /** |
|
41 | * @var Job |
|
42 | */ |
|
43 | protected $job; |
|
44 | ||
45 | /** |
|
46 | * @var ActionInterface |
|
47 | */ |
|
48 | protected $action; |
|
49 | ||
50 | /** |
|
51 | * @var Project[] |
|
52 | */ |
|
53 | protected $projects; |
|
54 | ||
55 | /** |
|
56 | * @param Cerbere $cerbere |
|
57 | * @param Job $job |
|
58 | * @param ActionInterface $action |
|
59 | * @param Project[] $projects |
|
60 | */ |
|
61 | public function __construct(Cerbere $cerbere, Job $job, ActionInterface $action, $projects = array()) |
|
62 | { |
|
63 | $this->cerbere = $cerbere; |
|
64 | $this->job = $job; |
|
65 | $this->action = $action; |
|
66 | $this->projects = $projects; |
|
67 | } |
|
68 | ||
69 | /** |
|
70 | * @return ActionInterface |
|
71 | */ |
|
72 | public function getAction() |
|
73 | { |
|
74 | return $this->action; |
|
75 | } |
|
76 | ||
77 | /** |
|
78 | * @param ActionInterface $action |
|
79 | */ |
|
80 | public function setAction($action) |
|
81 | { |
|
82 | $this->action = $action; |
|
83 | } |
|
84 | ||
85 | /** |
|
86 | * @return Cerbere |
|
87 | */ |
|
88 | public function getCerbere() |
|
89 | { |
|
90 | return $this->cerbere; |
|
91 | } |
|
92 | ||
93 | /** |
|
94 | * @return Job |
|
95 | */ |
|
96 | public function getJob() |
|
97 | { |
|
98 | return $this->job; |
|
99 | } |
|
100 | ||
101 | /** |
|
102 | * @param Job $job |
|
103 | */ |
|
104 | public function setJob($job) |
|
105 | { |
|
106 | $this->job = $job; |
|
107 | } |
|
108 | ||
109 | /** |
|
110 | * @return Project[] |
|
111 | */ |
|
112 | public function getProjects() |
|
113 | { |
|
114 | return $this->projects; |
|
115 | } |
|
116 | ||
117 | /** |
|
118 | * @param Project[] $projects |
|
119 | */ |
|
120 | public function setProjects($projects) |
|
121 | { |
|
122 | $this->projects = $projects; |
|
123 | } |
|
124 | } |
|
125 |