azure-storage-table/src/Table/TableRestProxy.php
public function getEntityAsync(
        $table,
        $partitionKey,
        $rowKey,
        GetEntityOptions $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_GET;
        $headers     = array();
        $queryParams = array();
        $path        = $this->getEntityPath($table, $partitionKey, $rowKey);

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

        // TODO: support payload format options
        $this->addOptionalHeader(
            $headers,
            Resources::CONTENT_TYPE,
            Resources::JSON_CONTENT_TYPE
        );
        $this->addOptionalHeader(
            $headers,
            Resources::ACCEPT_HEADER,
            $options->getAccept()
        );

        $context = new HttpCallContext();
        $context->setHeaders($headers);
        $context->setMethod($method);
        $context->setPath($path);
        $context->setQueryParameters($queryParams);
        $context->setStatusCodes(array(Resources::STATUS_OK));
        $context->setServiceOptions($options);

        $odataSerializer = $this->odataSerializer;

        return $this->sendContextAsync($context)->then(
            function ($response) use ($odataSerializer) {
                return GetEntityResult::create(
                    $response->getBody(),
                    $odataSerializer
                );
            },
            null
        );
    }
public function getEntityAsync(
        $table,
        $partitionKey,
        $rowKey,
        GetEntityOptions $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_GET;
        $headers     = array();
        $queryParams = array();
        $path        = $this->getEntityPath($table, $partitionKey, $rowKey);

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

        // TODO: support payload format options
        $this->addOptionalHeader(
            $headers,
            Resources::CONTENT_TYPE,
            Resources::JSON_CONTENT_TYPE
        );
        $this->addOptionalHeader(
            $headers,
            Resources::ACCEPT_HEADER,
            $options->getAccept()
        );

        $context = new HttpCallContext();
        $context->setHeaders($headers);
        $context->setMethod($method);
        $context->setPath($path);
        $context->setQueryParameters($queryParams);
        $context->setStatusCodes(array(Resources::STATUS_OK));
        $context->setServiceOptions($options);

        $odataSerializer = $this->odataSerializer;

        return $this->sendContextAsync($context)->then(
            function ($response) use ($odataSerializer) {
                return GetEntityResult::create(
                    $response->getBody(),
                    $odataSerializer
                );
            },
            null
        );
    }
Creates promise to get table entity.

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

@return \GuzzleHttp\Promise\PromiseInterface

@see http://msdn.microsoft.com/en-us/library/windowsazure/dd179421.aspx