浏览代码

Update Jsonable.md

Mark Scherer 2 年之前
父节点
当前提交
a1a855c336
共有 1 个文件被更改,包括 2 次插入3 次删除
  1. 2 3
      docs/Behavior/Jsonable.md

+ 2 - 3
docs/Behavior/Jsonable.md

@@ -12,8 +12,7 @@ Using 3.5+ you might not even need this anymore, as you can use type classes dir
      *
      * @return \Cake\Database\Schema\TableSchema
      */
-    protected function _initializeSchema(TableSchema $schema)
-    {
+    protected function _initializeSchema(TableSchema $schema) {
         $schema->columnType('my_field', 'json');
 
         return $schema;
@@ -22,7 +21,7 @@ Using 3.5+ you might not even need this anymore, as you can use type classes dir
 This is best combined with the Shim.Json type, as it properly handles `null` values:
 ```php
 // in bootstrap
-Type::map('json', 'Shim\Database\Type\JsonType');
+TypeFactory::map('json', 'Shim\Database\Type\JsonType');
 ```
 
 But if you still need/want more flexible approaches, continue reading.