소스 검색

Fix camelize

Thomas Rabaix 12 년 전
부모
커밋
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);
     }
 
     /**