helpers/inflector – Kohana API 2.3 Documentation

system/helpers/inflector.php

Class: inflector_Core

class inflector_Core

Inflector helper class.


Methods

inflector_Core :: uncountable

public static function uncountable

Checks if a word is defined as uncountable.

Parameters:

string str
word to check

Return: boolean


inflector_Core :: singular

public static function singular

Makes a plural word singular.

Parameters:

string str
word to singularize
integer count
(NULL) number of things

Return: string


inflector_Core :: plural

public static function plural

Makes a singular word plural.

Parameters:

string str
word to pluralize
count
(NULL)

Return: string


inflector_Core :: camelize

public static function camelize

Makes a phrase camel case.

Parameters:

string str
phrase to camelize

Return: string


inflector_Core :: underscore

public static function underscore

Makes a phrase underscored instead of spaced.

Parameters:

string str
phrase to underscore

Return: string


inflector_Core :: humanize

public static function humanize

Makes an underscored or dashed phrase human-reable.

Parameters:

string str
phrase to make human-reable

Return: string