本文整理汇总了PHP中fGrammar::plural_to_singular_rules方法的典型用法代码示例。如果您正苦于以下问题:PHP fGrammar::plural_to_singular_rules方法的具体用法?PHP fGrammar::plural_to_singular_rules怎么用?PHP fGrammar::plural_to_singular_rules使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类fGrammar
的用法示例。
在下文中一共展示了fGrammar::plural_to_singular_rules方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: reset
/**
* Resets the configuration of the class
*
* @internal
*
* @return void
*/
public static function reset()
{
self::$cache = array('camelize' => array(0 => array(), 1 => array()), 'humanize' => array(), 'pluralize' => array(), 'singularize' => array(), 'underscorize' => array());
self::$camelize_rules = array();
self::$humanize_rules = array();
self::$join_array_callback = NULL;
self::$plural_to_singular_rules = array('([ml])ice' => '\\1ouse', '(media|info(rmation)?|news)$' => '\\1', '(q)uizzes$' => '\\1uiz', '(c)hildren$' => '\\1hild', '(p)eople$' => '\\1erson', '(m)en$' => '\\1an', '((?!sh).)oes$' => '\\1o', '((?<!o)[ieu]s|[ieuo]x)es$' => '\\1', '([cs]h)es$' => '\\1', '(ss)es$' => '\\1', '([aeo]l)ves$' => '\\1f', '([^d]ea)ves$' => '\\1f', '(ar)ves$' => '\\1f', '([nlw]i)ves$' => '\\1fe', '([aeiou]y)s$' => '\\1', '([^aeiou])ies$' => '\\1y', '(la)ses$' => '\\1s', '(.)s$' => '\\1');
self::$singular_to_plural_rules = array('([ml])ouse$' => '\\1ice', '(media|info(rmation)?|news)$' => '\\1', '(phot|log)o$' => '\\1os', '^(q)uiz$' => '\\1uizzes', '(c)hild$' => '\\1hildren', '(p)erson$' => '\\1eople', '(m)an$' => '\\1en', '([ieu]s|[ieuo]x)$' => '\\1es', '([cs]h)$' => '\\1es', '(ss)$' => '\\1es', '([aeo]l)f$' => '\\1ves', '([^d]ea)f$' => '\\1ves', '(ar)f$' => '\\1ves', '([nlw]i)fe$' => '\\1ves', '([aeiou]y)$' => '\\1s', '([^aeiou])y$' => '\\1ies', '([^o])o$' => '\\1oes', 's$' => 'ses', '(.)$' => '\\1s');
}