Do not use BaseInflector. Use Inflector instead.
$string = 'cats'; $inflector = new yii\helpers\Inflector(); $singular = $inflector->singularize($string); // $singular now holds 'cat'
$string = 'person'; $inflector = new yii\helpers\Inflector(); $plural = $inflector->pluralize($string); // $plural now holds 'people'
$string = 'my variable name'; $inflector = new yii\helpers\Inflector(); $camelized = $inflector->camelize($string); // $camelized now holds 'myVariableName'
$string = 'upperCaseWords'; $inflector = new yii\helpers\Inflector(); $hyphenated = $inflector->hyphenate($string); // $hyphenated now holds 'upper-case-words'Overall, Inflector is a useful tool for manipulating strings and words in PHP. It can be used to automate the formatting of text in web applications.