PHP Class Neos\Kickstarter\Utility\Inflector

Afficher le fichier Open project: neos/flow-development-collection Class Usage Examples

Méthodes publiques

Méthode Description
humanizeCamelCase ( string $camelCased, boolean $lowercase = false ) : string Convert a model class name like "BlogAuthor" or a field name like "blogAuthor" to a humanized version like "Blog author" for better readability.
pluralize ( string $word ) : string

Méthodes protégées

Méthode Description
spacify ( string $camelCased, string $glue = ' ' ) : string Splits a string at lowercase/uppcase transitions and insert the glue character in between.

Method Details

humanizeCamelCase() public méthode

Convert a model class name like "BlogAuthor" or a field name like "blogAuthor" to a humanized version like "Blog author" for better readability.
public humanizeCamelCase ( string $camelCased, boolean $lowercase = false ) : string
$camelCased string The camel cased value
$lowercase boolean Return lowercase value
Résultat string The humanized value

pluralize() public méthode

public pluralize ( string $word ) : string
$word string The word to pluralize
Résultat string The pluralized word

spacify() protected méthode

Splits a string at lowercase/uppcase transitions and insert the glue character in between.
protected spacify ( string $camelCased, string $glue = ' ' ) : string
$camelCased string
$glue string
Résultat string