// change template system for AdminController

This commit is contained in:
aFolletete
2011-10-11 13:42:46 +00:00
parent a114eec8b3
commit a019c36cbe
6 changed files with 29 additions and 49 deletions
+11
View File
@@ -1227,6 +1227,17 @@ class ToolsCore
return preg_replace_callback('/_([a-z])/', create_function('$c', 'return strtoupper($c[1]);'), $str);
}
/**
*
* Transform a CamelCase string to underscore_case string
* @param string $string
* @return string
*/
public static function toUnderscoreCase($string)
{
return strtolower(preg_replace('/([a-z])([A-Z])/', '$1_$2', $string));
}
public static function getBrightness($hex)
{
$hex = str_replace('#', '', $hex);