1 | <?php |
||
24 | class Gherkin |
||
25 | { |
||
26 | const VERSION = '4.6.2'; |
||
27 | |||
28 | /** |
||
29 | * @var LoaderInterface[] |
||
30 | */ |
||
31 | protected $loaders = array(); |
||
32 | /** |
||
33 | * @var FeatureFilterInterface[] |
||
34 | */ |
||
35 | protected $filters = array(); |
||
36 | |||
37 | /** |
||
38 | * Adds loader to manager. |
||
39 | * |
||
40 | * @param LoaderInterface $loader Feature loader |
||
41 | */ |
||
42 | 4 | public function addLoader(LoaderInterface $loader) |
|
46 | |||
47 | /** |
||
48 | * Adds filter to manager. |
||
49 | * |
||
50 | * @param FeatureFilterInterface $filter Feature filter |
||
51 | */ |
||
52 | 3 | public function addFilter(FeatureFilterInterface $filter) |
|
56 | |||
57 | /** |
||
58 | * Sets filters to the parser. |
||
59 | * |
||
60 | * @param FeatureFilterInterface[] $filters |
||
61 | */ |
||
62 | 1 | public function setFilters(array $filters) |
|
67 | |||
68 | /** |
||
69 | * Sets base features path. |
||
70 | * |
||
71 | * @param string $path Loaders base path |
||
72 | */ |
||
73 | 1 | public function setBasePath($path) |
|
81 | |||
82 | /** |
||
83 | * Loads & filters resource with added loaders. |
||
84 | * |
||
85 | * @param mixed $resource Resource to load |
||
86 | * @param FeatureFilterInterface[] $filters Additional filters |
||
87 | * |
||
88 | * @return array |
||
89 | */ |
||
90 | 4 | public function load($resource, array $filters = array()) |
|
124 | |||
125 | /** |
||
126 | * Resolves loader by resource. |
||
127 | * |
||
128 | * @param mixed $resource Resource to load |
||
129 | * |
||
130 | * @return LoaderInterface |
||
131 | */ |
||
132 | 4 | public function resolveLoader($resource) |
|
142 | } |
||
143 |