當前位置: 首頁>>代碼示例>>PHP>>正文


PHP fGrammar::camelize_rules方法代碼示例

本文整理匯總了PHP中fGrammar::camelize_rules方法的典型用法代碼示例。如果您正苦於以下問題:PHP fGrammar::camelize_rules方法的具體用法?PHP fGrammar::camelize_rules怎麽用?PHP fGrammar::camelize_rules使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在fGrammar的用法示例。


在下文中一共展示了fGrammar::camelize_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');
 }
開發者ID:philip,項目名稱:flourish,代碼行數:16,代碼來源:fGrammar.php


注:本文中的fGrammar::camelize_rules方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。