1 | <?php |
||
40 | class Cerbere implements DispatcherAwareInterface |
||
41 | { |
||
42 | /** |
||
43 | * @var ParserInterface[] |
||
44 | */ |
||
45 | protected $parsers = array(); |
||
46 | |||
47 | /** |
||
48 | * @var EventDispatcherInterface |
||
49 | */ |
||
50 | protected $dispatcher; |
||
51 | |||
52 | /** |
||
53 | * |
||
54 | */ |
||
55 | public function __construct() |
||
58 | |||
59 | /** |
||
60 | * @param EventSubscriberInterface $listener |
||
61 | */ |
||
62 | public function addLoggerListener(EventSubscriberInterface $listener) |
||
66 | |||
67 | /** |
||
68 | * Gets the dispatcher used by this library to dispatch events. |
||
69 | * |
||
70 | * @return EventDispatcherInterface |
||
71 | */ |
||
72 | public function getDispatcher() |
||
80 | |||
81 | /** |
||
82 | * Sets the dispatcher used by this library to dispatch events. |
||
83 | * |
||
84 | * @param EventDispatcherInterface $dispatcher |
||
85 | * The Symfony event dispatcher object. |
||
86 | * |
||
87 | * @return $this |
||
88 | */ |
||
89 | public function setDispatcher(EventDispatcherInterface $dispatcher) |
||
93 | |||
94 | /** |
||
95 | * @param ParserInterface $parser |
||
96 | * |
||
97 | * @return $this |
||
98 | */ |
||
99 | public function addParser(ParserInterface $parser) |
||
105 | |||
106 | /** |
||
107 | * @param string $code |
||
108 | * |
||
109 | * @return ParserInterface|null |
||
110 | */ |
||
111 | public function getParser($code) |
||
119 | |||
120 | /** |
||
121 | * @param Job $job |
||
122 | * @param array $options |
||
123 | * |
||
124 | * @return array |
||
125 | */ |
||
126 | public function run(Job $job, $options = array()) |
||
154 | |||
155 | /** |
||
156 | * @param array $patterns |
||
157 | * @param bool|false $nested |
||
158 | * |
||
159 | * @return Project[] |
||
160 | */ |
||
161 | public function getProjectsFromPatterns($patterns, $nested = false) |
||
171 | |||
172 | /** |
||
173 | * @param Project[] $list |
||
174 | * @return Project[] |
||
175 | */ |
||
176 | public function dedupeProjectList($list) |
||
195 | |||
196 | /** |
||
197 | * @param string $pattern |
||
198 | * @param bool|false $nested |
||
199 | * |
||
200 | * @return Project[] |
||
201 | */ |
||
202 | public function getProjectsFromPattern($pattern, $nested = false) |
||
221 | |||
222 | /** |
||
223 | * @param string $pattern |
||
224 | * @param bool|false $nested |
||
225 | * @param int $flags |
||
226 | * |
||
227 | * @return array |
||
228 | */ |
||
229 | public function getFilesFromPattern($pattern, $nested = false, $flags = 0) |
||
244 | |||
245 | /** |
||
246 | * @return ParserInterface[] |
||
247 | */ |
||
248 | public function getParsers() |
||
252 | } |
||
253 |