public function addTable(Table $table)
    {
        if ($this->hasTable($table->getName())) {
            throw SchemaException::schemaTableAlreadyExists($this->getName(), $table->getName());
        }

        $this->tables[$table->getName()] = $table;

        if ($table->getSchema() !== $this) {
            $table->setSchema($this);
        }
    }
public function addTable(Table $table)
    {
        if ($this->hasTable($table->getName())) {
            throw SchemaException::schemaTableAlreadyExists($this->getName(), $table->getName());
        }

        $this->tables[$table->getName()] = $table;

        if ($table->getSchema() !== $this) {
            $table->setSchema($this);
        }
    }
public function addTable ( Table $ table ) { if ( $ this -> hasTable ( $ table -> getName ( ) ) ) { throw SchemaException :: schemaTableAlreadyExists ( $ this -> getName ( ) , $ table -> getName ( ) ) ; } $ this -> tables [ $ table -> getName ( ) ] = $ table ; if ( $ table -> getSchema ( ) !== $ this ) { $ table -> setSchema ( $ this ) ; } }
Adds a table to the schema.

@param \Fridge\DBAL\Schema\Table $table The table to add.

@throws \Fridge\DBAL\Exception\SchemaException If the table already exists.
Adds a table to the schema .