◆ __construct()
◆ camelize()
◆ capitalize()
capitalize |
( |
string |
$string, |
|
|
string |
$delimiters = " \n\t\r\0\x0B-" |
|
) |
| |
Uppercases words with configurable delimiters between words.
Takes a string and capitalizes all of the words, like PHP's built-in ucwords function. This extends that behavior, however, by allowing the word delimiters to be configured, rather than only separating on whitespace.
Here is an example: <?php $string = 'top-o-the-morning to all_of_you!'; echo $inflector->capitalize($string); // Top-O-The-Morning To All_of_you!
echo $inflector->capitalize($string, '-_ '); // Top-O-The-Morning To All_Of_You! ?>
- Paramètres
-
string | $string | The string to operate on. |
string | $delimiters | A list of word separators. |
- Renvoie
- string The string with all delimiter-separated words capitalized.
◆ classify()
◆ pluralize()
pluralize |
( |
string |
$word | ) |
|
Returns a word in plural form.
- Paramètres
-
string | $word | The word in singular form. |
- Renvoie
- string The word in plural form.
◆ seemsUtf8()
seemsUtf8 |
( |
string |
$string | ) |
|
Checks if the given string seems like it has utf8 characters in it.
- Paramètres
-
string | $string | The string to check for utf8 characters in. |
Références $i, $n, et elseif.
Référencé par Inflector\unaccent().
◆ singularize()
singularize |
( |
string |
$word | ) |
|
Returns a word in singular form.
- Paramètres
-
string | $word | The word in plural form. |
- Renvoie
- string The word in singular form.
◆ tableize()
Converts a word into the format for a Doctrine table name. Converts 'ModelName' to 'model_name'.
Références null.
◆ unaccent()
unaccent |
( |
string |
$string | ) |
|
◆ urlize()
Convert any passed string to a url friendly string. Converts 'My first blog post' to 'my-first-blog-post'
- Paramètres
-
string | $string | String to urlize. |
- Renvoie
- string Urlized string.
Références null, et Inflector\unaccent().
◆ $pluralizer
◆ $singularizer
◆ ACCENTED_CHARACTERS
const ACCENTED_CHARACTERS |
|
private |
La documentation de cette classe a été générée à partir du fichier suivant :