public function createTableAsync(
        $table,
        TableServiceCreateOptions $options = null
    ) {
        Validate::canCastAsString($table, 'table');
        Validate::notNullOrEmpty($table, 'table');

        $method      = Resources::HTTP_POST;
        $headers     = array();
        $postParams  = array();
        $queryParams = array();
        $path        = 'Tables';
        $body        = $this->odataSerializer->getTable($table);

        if (is_null($options)) {
            $options = new TableServiceCreateOptions();
        }

        $this->addOptionalHeader(
            $headers,
            Resources::CONTENT_TYPE,
            Resources::JSON_CONTENT_TYPE
        );
        $this->addOptionalHeader(
            $headers,
            Resources::ACCEPT_HEADER,
            $options->getAccept()
        );

        $this->addOptionalHeader(
            $headers,
            Resources::PREFER,
            $options->getDoesReturnContent() ? Resources::RETURN_CONTENT : null
        );
        $options->setLocationMode(LocationMode::PRIMARY_ONLY);

        return $this->sendAsync(
            $method,
            $headers,
            $queryParams,
            $postParams,
            $path,
            Resources::STATUS_CREATED,
            $body,
            $options
        );
    }
public function createTableAsync(
        $table,
        TableServiceCreateOptions $options = null
    ) {
        Validate::canCastAsString($table, 'table');
        Validate::notNullOrEmpty($table, 'table');

        $method      = Resources::HTTP_POST;
        $headers     = array();
        $postParams  = array();
        $queryParams = array();
        $path        = 'Tables';
        $body        = $this->odataSerializer->getTable($table);

        if (is_null($options)) {
            $options = new TableServiceCreateOptions();
        }

        $this->addOptionalHeader(
            $headers,
            Resources::CONTENT_TYPE,
            Resources::JSON_CONTENT_TYPE
        );
        $this->addOptionalHeader(
            $headers,
            Resources::ACCEPT_HEADER,
            $options->getAccept()
        );

        $this->addOptionalHeader(
            $headers,
            Resources::PREFER,
            $options->getDoesReturnContent() ? Resources::RETURN_CONTENT : null
        );
        $options->setLocationMode(LocationMode::PRIMARY_ONLY);

        return $this->sendAsync(
            $method,
            $headers,
            $queryParams,
            $postParams,
            $path,
            Resources::STATUS_CREATED,
            $body,
            $options
        );
    }
public function createTableAsync ( $ table , TableServiceCreateOptions $ options = null ) { Validate :: canCastAsString ( $ table , 'table' ) ; Validate :: notNullOrEmpty ( $ table , 'table' ) ; $ method = Resources :: HTTP_POST ; $ headers = array ( ) ; $ postParams = array ( ) ; $ queryParams = array ( ) ; $ path = 'Tables' ; $ body = $ this -> odataSerializer -> getTable ( $ table ) ; if ( is_null ( $ options ) ) { $ options = new TableServiceCreateOptions ( ) ; } $ this -> addOptionalHeader ( $ headers , Resources :: CONTENT_TYPE , Resources :: JSON_CONTENT_TYPE ) ; $ this -> addOptionalHeader ( $ headers , Resources :: ACCEPT_HEADER , $ options -> getAccept ( ) ) ; $ this -> addOptionalHeader ( $ headers , Resources :: PREFER , $ options -> getDoesReturnContent ( ) ? Resources :: RETURN_CONTENT : null ) ; $ options -> setLocationMode ( LocationMode :: PRIMARY_ONLY ) ; return $ this -> sendAsync ( $ method , $ headers , $ queryParams , $ postParams , $ path , Resources :: STATUS_CREATED , $ body , $ options ) ; }
Creates promise to create new table in the storage account

@param string                    $table   The name of the table.
@param TableServiceCreateOptions $options The optional parameters.

@return \GuzzleHttp\Promise\PromiseInterface

@see https://docs.microsoft.com/en-us/rest/api/storageservices/create-table
Creates promise to create new table in the storage account