Language inflection such as pluralisation.
This is the code documentation for the SproutCMS project
Search documentation |
class InflectorLanguage inflection such as pluralisation.
Extending this class<?php
/**
* New class description goes here
*
* @author Your Name, 2026-09-16
**/
class NewClassName extends Inflector {
/**
* Checks if a word is defined as uncountable.
**/
public function uncountable (string $str) {
// Method code goes here
}
/**
* Makes a plural word singular.
**/
public function singular (string $str, integer $count) {
// Method code goes here
}
/**
* Makes a singular word plural.
**/
public function plural (string $str, $count) {
// Method code goes here
}
/**
* Pluralises a number and word combination, e.g. [1, 'pig'] => '1 pig'; [0, 'pig'] => '0 pigs'
**/
public function numPlural (int $num, string $word) {
// Method code goes here
}
/**
* Makes a phrase camel case.
**/
public function camelize (string $str) {
// Method code goes here
}
/**
* Makes a phrase underscored instead of spaced.
**/
public function underscore (string $str) {
// Method code goes here
}
/**
* Makes an underscored or dashed phrase human-reable.
**/
public function humanize (string $str) {
// Method code goes here
}
}
?>
|
| Powered by Pelzini, version 0.9.0 |
Documentation is made available under the
GNU Free Documentation License 1.2. Generated: Tuesday, 15th September, 2026 at 10:26 am |
|