1 | <?php |
||
21 | final class TaxonContext implements Context |
||
22 | { |
||
23 | /** |
||
24 | * @var TaxonRepositoryInterface |
||
25 | */ |
||
26 | private $taxonRepository; |
||
27 | |||
28 | /** |
||
29 | * @param TaxonRepositoryInterface $taxonRepository |
||
30 | */ |
||
31 | public function __construct(TaxonRepositoryInterface $taxonRepository) |
||
35 | |||
36 | /** |
||
37 | * @Transform /^classified as "([^"]+)"$/ |
||
38 | * @Transform /^belongs to "([^"]+)"$/ |
||
39 | * @Transform /^"([^"]+)" taxon$/ |
||
40 | * @Transform /^"([^"]+)" as a parent taxon$/ |
||
41 | * @Transform /^"([^"]+)" parent taxon$/ |
||
42 | * @Transform /^parent taxon to "([^"]+)"$/ |
||
43 | * @Transform /^taxon with "([^"]+)" name/ |
||
44 | */ |
||
45 | public function getTaxonByName($taxonName) |
||
49 | |||
50 | /** |
||
51 | * @Transform /^taxon with "([^"]+)" code$/ |
||
52 | */ |
||
53 | public function getTaxonByCode($code) |
||
57 | |||
58 | /** |
||
59 | * @Transform /^classified as "([^"]+)" or "([^"]+)"$/ |
||
60 | */ |
||
61 | public function getTaxonsByNames($firstTaxon, $secondTaxon) |
||
68 | |||
69 | /** |
||
70 | * @param array $parameters |
||
71 | * |
||
72 | * @return object |
||
73 | */ |
||
74 | private function getTaxonBy(array $parameters) |
||
81 | } |
||
82 |