Exemplo n.º 1
0
 /**
  * underscore
  * @desc turns a camelcased string to a lowercase underscored string
  * @param string $word
  * @access public
  * @return string
  */
 public static function underscore($word = null)
 {
     $tmp = Google_Base::replace($word, array('/([A-Z]+)([A-Z][a-z])/' => '\\1_\\2', '/([a-z\\d])([A-Z])/' => '\\1_\\2'));
     return strtolower($tmp);
 }