Skip to content

Solve/Inflector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Solve inflector

v1.0.1

This class allows you to solve different word-related tasks.

Methods available at the current version

Inflector::transliterate($text, $direction = "en");
Inflector::slugify($text, $slugChar = '-');
Inflector::underscore($text);
Inflector::camelize($text);
Inflector::pluralize($text);
Inflector::singularize($text);
Inflector::priceToStringLong($price, $keepFloat = true, $currency = "uah", $language = null);
Inflector::priceToStringShort($price, $keepFloat = true, $currencyShortLabel = 'грн.', $language = null);

For the last two methods you can use a method to define default language:

Inflector::setDefaultLanguage($language)