Beispiel #1
0
 /**
  * @Transform /^classified as "([^"]+)"$/
  * @Transform /^belongs to "([^"]+)"$/
  * @Transform /^"([^"]+)" taxon$/
  * @Transform /^"([^"]+)" as a parent taxon$/
  * @Transform /^"([^"]+)" parent taxon$/
  * @Transform /^parent taxon to "([^"]+)"$/
  * @Transform /^taxon with "([^"]+)" name/
  * @Transform /^taxon "([^"]+)"$/
  * @Transform :taxon
  */
 public function getTaxonByName($name)
 {
     $taxons = $this->taxonRepository->findByName($name, 'en_US');
     Assert::eq(1, count($taxons), sprintf('%d taxons has been found with name "%s".', count($taxons), $name));
     return $taxons[0];
 }