public function withColumnsPrefixedBy(string $prefix) : Table
    {
        $columns = [];
        foreach ($this->columns as $column) {
            $columns[] = $column->withPrefix($prefix);
        }

        $indexes = [];
        foreach ($this->indexes as $index) {
            $indexes[] = $index->withColumnsPrefixedBy($prefix);
        }

        $foreignKeys = [];
        foreach ($this->foreignKeys as $foreignKey) {
            $foreignKeys[] = $foreignKey->withLocalColumnsPrefixedBy($prefix);
        }


        return new self(
            $this->name,
            $columns,
            $indexes,
            $foreignKeys
        );
    }
public function withColumnsPrefixedBy(string $prefix) : Table
    {
        $columns = [];
        foreach ($this->columns as $column) {
            $columns[] = $column->withPrefix($prefix);
        }

        $indexes = [];
        foreach ($this->indexes as $index) {
            $indexes[] = $index->withColumnsPrefixedBy($prefix);
        }

        $foreignKeys = [];
        foreach ($this->foreignKeys as $foreignKey) {
            $foreignKeys[] = $foreignKey->withLocalColumnsPrefixedBy($prefix);
        }


        return new self(
            $this->name,
            $columns,
            $indexes,
            $foreignKeys
        );
    }
public function withColumnsPrefixedBy ( string $ prefix ) : Table { $ columns = [ ] ; foreach ( $ this -> columns as $ column ) { $ columns [ ] = $ column -> withPrefix ( $ prefix ) ; } $ indexes = [ ] ; foreach ( $ this -> indexes as $ index ) { $ indexes [ ] = $ index -> withColumnsPrefixedBy ( $ prefix ) ; } $ foreignKeys = [ ] ; foreach ( $ this -> foreignKeys as $ foreignKey ) { $ foreignKeys [ ] = $ foreignKey -> withLocalColumnsPrefixedBy ( $ prefix ) ; } return new self ( $ this -> name , $ columns , $ indexes , $ foreignKeys ) ; }
Returns a table with the name and columns prefixed.

@param string $prefix

@return Table
Returns a table with the name and columns prefixed .