getEntityPropertySchema() публичный Метод

The schema is an associative array, using the property names as keys, and information about the property as the value. The value part consists of at least two keys: - kind: The kind of property, either column, which indicates that the property stems from a database column, or association, which identifies a property that is generated for an associated table. - type: The type of the property value. For the column kind this is the database type associated with the column, and for the association type it's the FQN of the entity class for the associated table. For association properties an additional key will be available - association: Holds an instance of the corresponding association class.
public getEntityPropertySchema ( Table $model ) : array
$model Cake\ORM\Table The model to introspect.
Результат array The property schema
Пример #1
0
 /**
  * test baking an entity with DocBlock property type hints.
  *
  * @return void
  */
 public function testBakeEntityWithPropertyTypeHints()
 {
     $model = TableRegistry::get('BakeArticles');
     $model->belongsTo('BakeUsers');
     $model->hasMany('BakeTest.Authors');
     $model->schema()->addColumn('unknown_type', ['type' => 'unknownType']);
     $config = ['fields' => false, 'propertySchema' => $this->Task->getEntityPropertySchema($model)];
     $result = $this->Task->bakeEntity($model, $config);
     $this->assertSameAsFile(__FUNCTION__ . '.php', $result);
 }