private function constructDeleteEntityContext(
        $table,
        $partitionKey,
        $rowKey,
        DeleteEntityOptions $options = null
    ) {
        Validate::canCastAsString($table, 'table');
        Validate::notNullOrEmpty($table, 'table');
        Validate::isTrue(!is_null($partitionKey), Resources::NULL_TABLE_KEY_MSG);
        Validate::isTrue(!is_null($rowKey), Resources::NULL_TABLE_KEY_MSG);

        $method      = Resources::HTTP_DELETE;
        $headers     = array();
        $queryParams = array();
        $statusCode  = Resources::STATUS_NO_CONTENT;
        $path        = $this->getEntityPath($table, $partitionKey, $rowKey);

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

        $etagObj = $options->getETag();
        $ETag    = !is_null($etagObj);
        $this->addOptionalHeader(
            $headers,
            Resources::IF_MATCH,
            $ETag ? $etagObj : Resources::ASTERISK
        );

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

        $options->setLocationMode(LocationMode::PRIMARY_ONLY);

        $context = new HttpCallContext();
        $context->setHeaders($headers);
        $context->setMethod($method);
        $context->setPath($path);
        $context->setQueryParameters($queryParams);
        $context->addStatusCode($statusCode);
        $context->setBody('');
        $context->setServiceOptions($options);

        return $context;
    }
private function constructDeleteEntityContext(
        $table,
        $partitionKey,
        $rowKey,
        DeleteEntityOptions $options = null
    ) {
        Validate::canCastAsString($table, 'table');
        Validate::notNullOrEmpty($table, 'table');
        Validate::isTrue(!is_null($partitionKey), Resources::NULL_TABLE_KEY_MSG);
        Validate::isTrue(!is_null($rowKey), Resources::NULL_TABLE_KEY_MSG);

        $method      = Resources::HTTP_DELETE;
        $headers     = array();
        $queryParams = array();
        $statusCode  = Resources::STATUS_NO_CONTENT;
        $path        = $this->getEntityPath($table, $partitionKey, $rowKey);

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

        $etagObj = $options->getETag();
        $ETag    = !is_null($etagObj);
        $this->addOptionalHeader(
            $headers,
            Resources::IF_MATCH,
            $ETag ? $etagObj : Resources::ASTERISK
        );

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

        $options->setLocationMode(LocationMode::PRIMARY_ONLY);

        $context = new HttpCallContext();
        $context->setHeaders($headers);
        $context->setMethod($method);
        $context->setPath($path);
        $context->setQueryParameters($queryParams);
        $context->addStatusCode($statusCode);
        $context->setBody('');
        $context->setServiceOptions($options);

        return $context;
    }
private function constructDeleteEntityContext ( $ table , $ partitionKey , $ rowKey , DeleteEntityOptions $ options = null ) { Validate :: canCastAsString ( $ table , 'table' ) ; Validate :: notNullOrEmpty ( $ table , 'table' ) ; Validate :: isTrue ( ! is_null ( $ partitionKey ) , Resources :: NULL_TABLE_KEY_MSG ) ; Validate :: isTrue ( ! is_null ( $ rowKey ) , Resources :: NULL_TABLE_KEY_MSG ) ; $ method = Resources :: HTTP_DELETE ; $ headers = array ( ) ; $ queryParams = array ( ) ; $ statusCode = Resources :: STATUS_NO_CONTENT ; $ path = $ this -> getEntityPath ( $ table , $ partitionKey , $ rowKey ) ; if ( is_null ( $ options ) ) { $ options = new DeleteEntityOptions ( ) ; } $ etagObj = $ options -> getETag ( ) ; $ ETag = ! is_null ( $ etagObj ) ; $ this -> addOptionalHeader ( $ headers , Resources :: IF_MATCH , $ ETag ? $ etagObj : Resources :: ASTERISK ) ; $ this -> addOptionalHeader ( $ headers , Resources :: ACCEPT_HEADER , Resources :: JSON_CONTENT_TYPE ) ; $ options -> setLocationMode ( LocationMode :: PRIMARY_ONLY ) ; $ context = new HttpCallContext ( ) ; $ context -> setHeaders ( $ headers ) ; $ context -> setMethod ( $ method ) ; $ context -> setPath ( $ path ) ; $ context -> setQueryParameters ( $ queryParams ) ; $ context -> addStatusCode ( $ statusCode ) ; $ context -> setBody ( '' ) ; $ context -> setServiceOptions ( $ options ) ; return $ context ; }
Constructs HTTP call context for deleteEntity API.

@param string              $table        The name of the table.
@param string              $partitionKey The entity partition key.
@param string              $rowKey       The entity row key.
@param DeleteEntityOptions $options      The optional parameters.

@return HttpCallContext
Constructs HTTP call context for deleteEntity API .