Migrations\View\Helper\MigrationHelper::schema PHP Method

schema() protected method

Returns the Cake\Database\Schema\Table for $table
protected schema ( string $table ) : Cake\Database\Schema\Table
$table string Name of the table to get the Schema for
return Cake\Database\Schema\Table
    protected function schema($table)
    {
        if (isset($this->schemas[$table])) {
            return $this->schemas[$table];
        }
        if ($table instanceof Table) {
            return $this->schemas[$table->name()] = $table;
        }
        $collection = $this->config('collection');
        $schema = $collection->describe($table);
        $this->schemas[$table] = $schema;
        return $schema;
    }