src/Codegen/CodegenBase.php
protected function pluralize($strName)
    {
        // Special Rules go Here
        switch (true) {
            case (strtolower($strName) == 'play'):
                return $strName . 's';
        }

        $intLength = strlen($strName);
        if (substr($strName, $intLength - 1) == "y") {
            return substr($strName, 0, $intLength - 1) . "ies";
        }
        if (substr($strName, $intLength - 1) == "s") {
            return $strName . "es";
        }
        if (substr($strName, $intLength - 1) == "x") {
            return $strName . "es";
        }
        if (substr($strName, $intLength - 1) == "z") {
            return $strName . "zes";
        }
        if (substr($strName, $intLength - 2) == "sh") {
            return $strName . "es";
        }
        if (substr($strName, $intLength - 2) == "ch") {
            return $strName . "es";
        }

        return $strName . "s";
    }
protected function pluralize($strName)
    {
        // Special Rules go Here
        switch (true) {
            case (strtolower($strName) == 'play'):
                return $strName . 's';
        }

        $intLength = strlen($strName);
        if (substr($strName, $intLength - 1) == "y") {
            return substr($strName, 0, $intLength - 1) . "ies";
        }
        if (substr($strName, $intLength - 1) == "s") {
            return $strName . "es";
        }
        if (substr($strName, $intLength - 1) == "x") {
            return $strName . "es";
        }
        if (substr($strName, $intLength - 1) == "z") {
            return $strName . "zes";
        }
        if (substr($strName, $intLength - 2) == "sh") {
            return $strName . "es";
        }
        if (substr($strName, $intLength - 2) == "ch") {
            return $strName . "es";
        }

        return $strName . "s";
    }
protected function pluralize ( $ strName ) { // Special Rules go Here switch ( true ) { case ( strtolower ( $ strName ) == 'play' ) : return $ strName . 's' ; } $ intLength = strlen ( $ strName ) ; if ( substr ( $ strName , $ intLength - 1 ) == "y" ) { return substr ( $ strName , 0 , $ intLength - 1 ) . "ies" ; } if ( substr ( $ strName , $ intLength - 1 ) == "s" ) { return $ strName . "es" ; } if ( substr ( $ strName , $ intLength - 1 ) == "x" ) { return $ strName . "es" ; } if ( substr ( $ strName , $ intLength - 1 ) == "z" ) { return $ strName . "zes" ; } if ( substr ( $ strName , $ intLength - 2 ) == "sh" ) { return $ strName . "es" ; } if ( substr ( $ strName , $ intLength - 2 ) == "ch" ) { return $ strName . "es" ; } return $ strName . "s" ; }
Return the plural of the given name. Override this and return the plural version of particular names
if this generic version isn't working for you.

@param string $strName
@return string
Return the plural of the given name . Override this and return the plural version of particular names if this generic version isn t working for you .