public function table($name, $callback = null)
    {   
        if (! $callback instanceof \Closure) {
            throw InvalidArgumentPassedException::isNotClosure();
        }

        $this->setTableName($name);

        $callback($this);
        
        $tableNamePrefixed = $this->getTableNamePrefix($this->getTableName());
        $tableStructure = \substr($this->getColumnsQuery() . $this->getPrimaryKeyQuery(), 0, -2);
        $tableCharsetCollate = $this->getCharacterSetCollate();

        $this->buildCreateTableQuery($tableNamePrefixed, $tableStructure, $tableCharsetCollate);

        $this->flushColumns();
        $this->flushPrimaryKey();
    }
public function table($name, $callback = null)
    {   
        if (! $callback instanceof \Closure) {
            throw InvalidArgumentPassedException::isNotClosure();
        }

        $this->setTableName($name);

        $callback($this);
        
        $tableNamePrefixed = $this->getTableNamePrefix($this->getTableName());
        $tableStructure = \substr($this->getColumnsQuery() . $this->getPrimaryKeyQuery(), 0, -2);
        $tableCharsetCollate = $this->getCharacterSetCollate();

        $this->buildCreateTableQuery($tableNamePrefixed, $tableStructure, $tableCharsetCollate);

        $this->flushColumns();
        $this->flushPrimaryKey();
    }
public function table ( $ name , $ callback = null ) { if ( ! $ callback instanceof \ Closure ) { throw InvalidArgumentPassedException :: isNotClosure ( ) ; } $ this -> setTableName ( $ name ) ; $ callback ( $ this ) ; $ tableNamePrefixed = $ this -> getTableNamePrefix ( $ this -> getTableName ( ) ) ; $ tableStructure = \ substr ( $ this -> getColumnsQuery ( ) . $ this -> getPrimaryKeyQuery ( ) , 0 , - 2 ) ; $ tableCharsetCollate = $ this -> getCharacterSetCollate ( ) ; $ this -> buildCreateTableQuery ( $ tableNamePrefixed , $ tableStructure , $ tableCharsetCollate ) ; $ this -> flushColumns ( ) ; $ this -> flushPrimaryKey ( ) ; }
The composer of the database table schema.

@param  string    $name
@param  \Closure  $callback

@throws LordDashMe\Wordpress\DB\Exception\InvalidArgumentPassed

@return void
The composer of the database table schema .