CoreFiles by mySites.guru
Inflectible.php34 lines, 1,006 bytes, from Joomla_6.0.2-Stable-Full_Package.zip
Raw History Compare with 6.0.1
md5
4a2435115f93c4549d77a9e9cb4e17b6
sha1
87de656bc364fa7a4d8d51e4de2c990e36b8b050
sha256
4e229fda42e44043a23670920250918be808cd1bcd456b5bb15356cb736cd31f
<?php

declare(strict_types=1);

namespace Doctrine\Inflector\Rules\Turkish;

use Doctrine\Inflector\Rules\Pattern;
use Doctrine\Inflector\Rules\Substitution;
use Doctrine\Inflector\Rules\Transformation;
use Doctrine\Inflector\Rules\Word;

class Inflectible
{
    /** @return Transformation[] */
    public static function getSingular(): iterable
    {
        yield new Transformation(new Pattern('/l[ae]r$/i'), '');
    }

    /** @return Transformation[] */
    public static function getPlural(): iterable
    {
        yield new Transformation(new Pattern('/([eöiü][^aoıueöiü]{0,6})$/u'), '\1ler');
        yield new Transformation(new Pattern('/([aoıu][^aoıueöiü]{0,6})$/u'), '\1lar');
    }

    /** @return Substitution[] */
    public static function getIrregular(): iterable
    {
        yield new Substitution(new Word('ben'), new Word('biz'));
        yield new Substitution(new Word('sen'), new Word('siz'));
        yield new Substitution(new Word('o'), new Word('onlar'));
    }
}

The same content is in 46 releases, Joomla 6.0.0-rc1 to 6.3.0-alpha1. See them all, or every version of this file.