public function getSchemaTables(Schema $schema)
    {
        $tables = [];

        foreach ($this->tables->keys() as $name) {
            /** @var BaseTable $table */
            $table = $this->tables[$name];
            $tables[$name] = $table->buildTable($schema, $name, $this->charset, $this->collate);
        }

        foreach ($this->tableGenerators as $generator) {
            $table = $generator($schema);

            if (is_array($table)) {
                /** @var Table[] $table */
                foreach ($table as $t) {
                    $alias = str_replace($this->prefix, '', $t->getName());
                    $t->addOption('alias', $alias);
                    $t->addOption('charset', $this->charset);
                    $t->addOption('collate', $this->collate);
                    $tables[$alias] = $t;
                }
            } else {
                /** @var Table $table */
                $alias = str_replace($this->prefix, '', $table->getName());
                $table->addOption('alias', $alias);
                $table->addOption('charset', $this->charset);
                $table->addOption('collate', $this->collate);
                $tables[$alias] = $table;
            }
        }

        return $tables;
    }
public function getSchemaTables(Schema $schema)
    {
        $tables = [];

        foreach ($this->tables->keys() as $name) {
            /** @var BaseTable $table */
            $table = $this->tables[$name];
            $tables[$name] = $table->buildTable($schema, $name, $this->charset, $this->collate);
        }

        foreach ($this->tableGenerators as $generator) {
            $table = $generator($schema);

            if (is_array($table)) {
                /** @var Table[] $table */
                foreach ($table as $t) {
                    $alias = str_replace($this->prefix, '', $t->getName());
                    $t->addOption('alias', $alias);
                    $t->addOption('charset', $this->charset);
                    $t->addOption('collate', $this->collate);
                    $tables[$alias] = $t;
                }
            } else {
                /** @var Table $table */
                $alias = str_replace($this->prefix, '', $table->getName());
                $table->addOption('alias', $alias);
                $table->addOption('charset', $this->charset);
                $table->addOption('collate', $this->collate);
                $tables[$alias] = $table;
            }
        }

        return $tables;
    }
public function getSchemaTables ( Schema $ schema ) { $ tables = [ ] ; foreach ( $ this -> tables -> keys ( ) as $ name ) { /** @var BaseTable $table */ $ table = $ this -> tables [ $ name ] ; $ tables [ $ name ] = $ table -> buildTable ( $ schema , $ name , $ this -> charset , $ this -> collate ) ; } foreach ( $ this -> tableGenerators as $ generator ) { $ table = $ generator ( $ schema ) ; if ( is_array ( $ table ) ) { /** @var Table[] $table */ foreach ( $ table as $ t ) { $ alias = str_replace ( $ this -> prefix , '' , $ t -> getName ( ) ) ; $ t -> addOption ( 'alias' , $ alias ) ; $ t -> addOption ( 'charset' , $ this -> charset ) ; $ t -> addOption ( 'collate' , $ this -> collate ) ; $ tables [ $ alias ] = $ t ; } } else { /** @var Table $table */ $ alias = str_replace ( $ this -> prefix , '' , $ table -> getName ( ) ) ; $ table -> addOption ( 'alias' , $ alias ) ; $ table -> addOption ( 'charset' , $ this -> charset ) ; $ table -> addOption ( 'collate' , $ this -> collate ) ; $ tables [ $ alias ] = $ table ; } } return $ tables ; }
Get all the registered extension tables.

We need to be prepared for generators returning a single table, as well
as generators returning an array of tables.

@param Schema $schema

@return \Doctrine\DBAL\Schema\Table[]
Get all the registered extension tables .