SproutCMS

This is the code documentation for the SproutCMS project

Page options:

Inherited members

class Inflector

Language inflection such as pluralisation.

Variables

NameVisibilityDescription
$cache (static) 
$irregular (static) 
$uncountable (static) 

Functions

NameVisibilityDescription
camelizepublic (static)Makes a phrase camel case.
humanizepublic (static)Makes an underscored or dashed phrase human-reable.
numPluralpublic (static)Pluralises a number and word combination, e.g. [1, 'pig'] => '1 pig'; [0, 'pig'] => '0 pigs'
pluralpublic (static)Makes a singular word plural.
singularpublic (static)Makes a plural word singular.
uncountablepublic (static)Checks if a word is defined as uncountable.
underscorepublic (static)Makes a phrase underscored instead of spaced.

public camelize

string Inflector::camelize ( string $str );

Makes a phrase camel case.

public humanize

string Inflector::humanize ( string $str );

Makes an underscored or dashed phrase human-reable.

public numPlural

unknown Inflector::numPlural ( int $num , string $word );

Pluralises a number and word combination, e.g. [1, 'pig'] => '1 pig'; [0, 'pig'] => '0 pigs'

public plural

string Inflector::plural ( string $str [, mixed $count ] );

Makes a singular word plural.

public singular

string Inflector::singular ( string $str [, integer $count ] );

Makes a plural word singular.

public uncountable

boolean Inflector::uncountable ( string $str );

Checks if a word is defined as uncountable.

public underscore

string Inflector::underscore ( string $str );

Makes a phrase underscored instead of spaced.