table = $table; } /** * Adds a column to the collection * * @param \Phinx\Db\Table\Column $column The column description * @return void */ public function addColumn(Column $column): void { $this->columns[] = $column; } /** * Adds an index to the collection * * @param \Phinx\Db\Table\Index $index The index description * @return void */ public function addIndex(Index $index): void { $this->indexes[] = $index; } /** * Returns the table object associated to this collection * * @return \Phinx\Db\Table\Table */ public function getTable(): Table { return $this->table; } /** * Returns the columns collection * * @return \Phinx\Db\Table\Column[] */ public function getColumns(): array { return $this->columns; } /** * Returns the indexes collection * * @return \Phinx\Db\Table\Index[] */ public function getIndexes(): array { return $this->indexes; } }