src/Actions/ManagesMysqlDatabases.php
public function createMysqlDatabase($serverId, array $data, $wait = true)
    {
        $database = $this->post("servers/$serverId/mysql", $data)['database'];

        if ($wait) {
            return $this->retry($this->getTimeout(), function () use ($serverId, $database) {
                $database = $this->mysqlDatabase($serverId, $database['id']);

                return $database->status == 'installed' ? $database : null;
            });
        }

        return new MysqlDatabase($database + ['server_id' => $serverId], $this);
    }
public function createMysqlDatabase($serverId, array $data, $wait = true)
    {
        $database = $this->post("servers/$serverId/mysql", $data)['database'];

        if ($wait) {
            return $this->retry($this->getTimeout(), function () use ($serverId, $database) {
                $database = $this->mysqlDatabase($serverId, $database['id']);

                return $database->status == 'installed' ? $database : null;
            });
        }

        return new MysqlDatabase($database + ['server_id' => $serverId], $this);
    }
public function createMysqlDatabase ( $ serverId , array $ data , $ wait = true ) { $ database = $ this -> post ( "servers/$serverId/mysql" , $ data ) [ 'database' ] ; if ( $ wait ) { return $ this -> retry ( $ this -> getTimeout ( ) , function ( ) use ( $ serverId , $ database ) { $ database = $ this -> mysqlDatabase ( $ serverId , $ database [ 'id' ] ) ; return $ database -> status == 'installed' ? $ database : null ; } ) ; } return new MysqlDatabase ( $ database + [ 'server_id' => $ serverId ] , $ this ) ; }
Create a new MySQL Database.

@param  integer $serverId
@param  array $data
@param  boolean $wait
@return MysqlDatabase
Create a new MySQL Database .