1 | <?php |
||
20 | class Cerbere |
||
21 | { |
||
22 | /** |
||
23 | * @var ParserInterface[] |
||
24 | */ |
||
25 | protected $parsers = array(); |
||
26 | |||
27 | /** |
||
28 | * @var EventDispatcherInterface |
||
29 | */ |
||
30 | protected $dispatcher; |
||
31 | |||
32 | /** |
||
33 | */ |
||
34 | public function __construct() |
||
37 | |||
38 | /** |
||
39 | * @param CerbereLoggerListener $listener |
||
40 | * |
||
41 | * @return $this |
||
42 | */ |
||
43 | public function addLoggerListener(CerbereLoggerListener $listener) |
||
49 | |||
50 | /** |
||
51 | * Gets the dispatcher used by this library to dispatch events. |
||
52 | * |
||
53 | * @return EventDispatcherInterface |
||
54 | */ |
||
55 | public function getDispatcher() |
||
63 | |||
64 | /** |
||
65 | * Sets the dispatcher used by this library to dispatch events. |
||
66 | * |
||
67 | * @param EventDispatcherInterface $dispatcher |
||
68 | * The Symfony event dispatcher object. |
||
69 | * |
||
70 | * @return $this |
||
71 | */ |
||
72 | public function setDispatcher(EventDispatcherInterface $dispatcher) |
||
78 | |||
79 | /** |
||
80 | * @param ParserInterface $parser |
||
81 | * |
||
82 | * @return $this |
||
83 | */ |
||
84 | public function addParser(ParserInterface $parser) |
||
90 | |||
91 | /** |
||
92 | * @param string $code |
||
93 | * @return ParserInterface|null |
||
94 | */ |
||
95 | public function getParser($code) |
||
103 | |||
104 | /** |
||
105 | * @param Job $job |
||
106 | * @param ActionInterface $action |
||
107 | * @param array $options |
||
108 | * |
||
109 | * @return array |
||
110 | */ |
||
111 | public function run(Job $job, ActionInterface $action, $options = array()) |
||
131 | |||
132 | /** |
||
133 | * @return Project[] |
||
134 | */ |
||
135 | public function getProjectsFromPatterns($patterns) |
||
145 | |||
146 | /** |
||
147 | * @param string $pattern |
||
148 | * |
||
149 | * @return Project[] |
||
150 | */ |
||
151 | public function getProjectsFromPattern($pattern) |
||
170 | |||
171 | /** |
||
172 | * @return ParserInterface[] |
||
173 | */ |
||
174 | public function getParsers() |
||
178 | } |
||
179 |