浏览代码

Fix camelize

Thomas Rabaix 11 年之前
父节点
当前提交
9025363c02
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      Admin/BaseFieldDescription.php

+ 3 - 1
Admin/BaseFieldDescription.php

@@ -403,7 +403,9 @@ abstract class BaseFieldDescription implements FieldDescriptionInterface
      */
     public static function camelize($property)
     {
-        return Container::camelize($property);
+        return preg_replace_callback('/(^|[_. ])+(.)/', function ($match) {
+            return ('.' === $match[1] ? '_' : '') . strtoupper($match[2]);
+        }, $property);
     }
 
     /**