Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
File Manager
/
vendor
/
doctrine
/
inflector
/
lib
/
Doctrine
/
Inflector
/
Rules
:
Transformations.php
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
<?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; } }