Inflection.php
public function inflect($text, $zivotne = false, $preferovanyRod = '')
    {
        $aTxt = $this->_txtSplit($text);

        $this->PrefRod = '0';
        $out = [];
        for ($i = \count($aTxt) - 1; $i >= 0; $i--) {
            // vysklonovani
            $this->_skl2($aTxt[$i], $preferovanyRod, $zivotne);

            // vynuceni rodu podle posledniho slova
            if ($i === \count($aTxt) - 1) {
                $this->PrefRod = $this->astrTvar[0];
            }
            // pokud nenajdeme vzor tak nesklonujeme
            if ($i < \count($aTxt) - 1 && mb_substr($this->PrefRod, 0, 1, 'UTF-8') !== '?' && mb_substr($this->astrTvar[0], 0, 1, 'UTF-8') === '?') {
                for ($j = 1; $j < 15; $j++) {
                    $this->astrTvar[$j] = $aTxt[$i];
                }
            }

            if (mb_substr($this->astrTvar[0], 0, 1, 'UTF-8') === '?') {
                $this->astrTvar[0] = '';
            }
            if ($i < \count($aTxt)) {
                for ($j = 1; $j < 15; $j++) {
                    @$out[$j] = $this->astrTvar[$j] . ' ' . @$out[$j];
                }
            } else {
                for ($j = 1; $j < 15; $j++) {
                    @$out[$j] = $this->astrTvar[$j];
                }
            }
        }

        return $out;
    }
public function inflect($text, $zivotne = false, $preferovanyRod = '')
    {
        $aTxt = $this->_txtSplit($text);

        $this->PrefRod = '0';
        $out = [];
        for ($i = \count($aTxt) - 1; $i >= 0; $i--) {
            // vysklonovani
            $this->_skl2($aTxt[$i], $preferovanyRod, $zivotne);

            // vynuceni rodu podle posledniho slova
            if ($i === \count($aTxt) - 1) {
                $this->PrefRod = $this->astrTvar[0];
            }
            // pokud nenajdeme vzor tak nesklonujeme
            if ($i < \count($aTxt) - 1 && mb_substr($this->PrefRod, 0, 1, 'UTF-8') !== '?' && mb_substr($this->astrTvar[0], 0, 1, 'UTF-8') === '?') {
                for ($j = 1; $j < 15; $j++) {
                    $this->astrTvar[$j] = $aTxt[$i];
                }
            }

            if (mb_substr($this->astrTvar[0], 0, 1, 'UTF-8') === '?') {
                $this->astrTvar[0] = '';
            }
            if ($i < \count($aTxt)) {
                for ($j = 1; $j < 15; $j++) {
                    @$out[$j] = $this->astrTvar[$j] . ' ' . @$out[$j];
                }
            } else {
                for ($j = 1; $j < 15; $j++) {
                    @$out[$j] = $this->astrTvar[$j];
                }
            }
        }

        return $out;
    }
Sklonuje vstupni text

@param string $text Vstupni text
@param bool $zivotne Sklonovat jako zivotne
@param string $preferovanyRod Preferovany rod nebo prazdny retezec pro autodetekci

@return array Vysklonovany vstupni text (vsechny pady v poli)