芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/www/vendor/doctrine/inflector/lib/Doctrine/Inflector/Rules/Substitutions.php
substitutions[$substitution->getFrom()->getWord()] = $substitution; } } public function getFlippedSubstitutions() : Substitutions { $substitutions = []; foreach ($this->substitutions as $substitution) { $substitutions[] = new Substitution( $substitution->getTo(), $substitution->getFrom() ); } return new Substitutions(...$substitutions); } public function inflect(string $word) : string { $lowerWord = strtolower($word); if (isset($this->substitutions[$lowerWord])) { $firstLetterUppercase = $lowerWord[0] !== $word[0]; $toWord = $this->substitutions[$lowerWord]->getTo()->getWord(); if ($firstLetterUppercase) { return strtoupper($toWord[0]) . substr($toWord, 1); } return $toWord; } return $word; } }