File Editor
Directories:
.. (Back)
English
French
NorwegianBokmal
Portuguese
Spanish
Turkish
Files:
Pattern.php
Patterns.php
Ruleset.php
Substitution.php
Substitutions.php
Transformation.php
Transformations.php
Word.php
Create New File
Create
Edit File: Transformations.php
<?php declare(strict_types=1); namespace Doctrine\Inflector\Rules; use Doctrine\Inflector\WordInflector; class Transformations implements WordInflector { /** @var Transformation[] */ private $transformations; public function __construct(Transformation ...$transformations) { $this->transformations = $transformations; } public function inflect(string $word): string { foreach ($this->transformations as $transformation) { if ($transformation->getPattern()->matches($word)) { return $transformation->inflect($word); } } return $word; } }
Save Changes
Rename File
Rename