Not use deprecated code
This commit is contained in:
@@ -134,14 +134,16 @@ class Helpers {
|
|||||||
if($capitalise_first_char) {
|
if($capitalise_first_char) {
|
||||||
$str[0] = strtoupper($str[0]);
|
$str[0] = strtoupper($str[0]);
|
||||||
}
|
}
|
||||||
$func = create_function('$c', 'return strtoupper($c[1]);');
|
return preg_replace_callback('/_([a-z])/', function ($c) {
|
||||||
return preg_replace_callback('/_([a-z])/', $func, $str);
|
return strtoupper($c[1]);
|
||||||
|
}, $str);
|
||||||
}
|
}
|
||||||
|
|
||||||
static function camelCaseToUnderscore($str) {
|
static function camelCaseToUnderscore($str) {
|
||||||
$str[0] = strtolower($str[0]);
|
$str[0] = strtolower($str[0]);
|
||||||
$func = create_function('$c', 'return "_" . strtolower($c[1]);');
|
return preg_replace_callback('/([A-Z])/', function ($c) {
|
||||||
return preg_replace_callback('/([A-Z])/', $func, $str);
|
return "_" . strtolower($c[1]);
|
||||||
|
}, $str);
|
||||||
}
|
}
|
||||||
|
|
||||||
static function joinObject($object = array()) {
|
static function joinObject($object = array()) {
|
||||||
|
Reference in New Issue
Block a user