SproutCMS

This is the code documentation for the SproutCMS project

class Inflector

Language 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'] =&gt; '1 pig'; [0, 'pig'] =&gt; '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
    }
    
}
?>