ソースを参照

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.