| 1 |
<?php |
| 2 |
|
| 3 |
declare(strict_types=1); |
| 4 |
|
| 5 |
namespace Doctrine\Inflector\Rules\Turkish; |
| 6 |
|
| 7 |
use Doctrine\Inflector\Rules\Pattern; |
| 8 |
use Doctrine\Inflector\Rules\Substitution; |
| 9 |
use Doctrine\Inflector\Rules\Transformation; |
| 10 |
use Doctrine\Inflector\Rules\Word; |
| 11 |
|
| 12 |
class Inflectible |
| 13 |
{ |
| 14 |
|
| 15 |
public static function getSingular(): iterable |
| 16 |
{ |
| 17 |
yield new Transformation(new Pattern('/l[ae]r$/i'), ''); |
| 18 |
} |
| 19 |
|
| 20 |
|
| 21 |
public static function getPlural(): iterable |
| 22 |
{ |
| 23 |
yield new Transformation(new Pattern('/([eöiü][^aoıueöiü]{0,6})$/u'), '\1ler'); |
| 24 |
yield new Transformation(new Pattern('/([aoıu][^aoıueöiü]{0,6})$/u'), '\1lar'); |
| 25 |
} |
| 26 |
|
| 27 |
|
| 28 |
public static function getIrregular(): iterable |
| 29 |
{ |
| 30 |
yield new Substitution(new Word('ben'), new Word('biz')); |
| 31 |
yield new Substitution(new Word('sen'), new Word('siz')); |
| 32 |
yield new Substitution(new Word('o'), new Word('onlar')); |
| 33 |
} |
| 34 |
} |