public static getTableSchema ( ) : yii\db\TableSchema | ||
return | yii\db\TableSchema | the schema information of the DB table associated with this AR class. |
public static function getTableSchema()
{
$tableSchema = static::getDb()->getSchema()->getTableSchema(static::tableName());
if ($tableSchema === null) {
throw new InvalidConfigException('The table does not exist: ' . static::tableName());
}
return $tableSchema;
}
public static function getTableSchema() { $class = get_called_class(); if (!isset(self::$getTableSchemaCache[$class])) { self::$getTableSchemaCache[$class] = parent::getTableSchema(); } return self::$getTableSchemaCache[$class]; }