public function getQueueMetadataAsync(
        $queueName,
        QueueServiceOptions $options = null
    ) {
        Validate::canCastAsString($queueName, 'queueName');
        Validate::notNullOrEmpty($queueName, 'queueName');

        $method      = Resources::HTTP_GET;
        $headers     = array();
        $postParams  = array();
        $queryParams = array();
        $path        = $queueName;
        $body        = Resources::EMPTY_STRING;

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

        $this->addOptionalQueryParam($queryParams, Resources::QP_COMP, 'metadata');

        return $this->sendAsync(
            $method,
            $headers,
            $queryParams,
            $postParams,
            $path,
            Resources::STATUS_OK,
            $body,
            $options
        )->then(function ($response) {
            $responseHeaders = HttpFormatter::formatHeaders($response->getHeaders());
            $metadata = Utilities::getMetadataArray($responseHeaders);
            $maxCount = intval(
                Utilities::tryGetValue(
                    $responseHeaders,
                    Resources::X_MS_APPROXIMATE_MESSAGES_COUNT
                )
            );

            return new GetQueueMetadataResult($maxCount, $metadata);
        }, null);
    }
public function getQueueMetadataAsync(
        $queueName,
        QueueServiceOptions $options = null
    ) {
        Validate::canCastAsString($queueName, 'queueName');
        Validate::notNullOrEmpty($queueName, 'queueName');

        $method      = Resources::HTTP_GET;
        $headers     = array();
        $postParams  = array();
        $queryParams = array();
        $path        = $queueName;
        $body        = Resources::EMPTY_STRING;

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

        $this->addOptionalQueryParam($queryParams, Resources::QP_COMP, 'metadata');

        return $this->sendAsync(
            $method,
            $headers,
            $queryParams,
            $postParams,
            $path,
            Resources::STATUS_OK,
            $body,
            $options
        )->then(function ($response) {
            $responseHeaders = HttpFormatter::formatHeaders($response->getHeaders());
            $metadata = Utilities::getMetadataArray($responseHeaders);
            $maxCount = intval(
                Utilities::tryGetValue(
                    $responseHeaders,
                    Resources::X_MS_APPROXIMATE_MESSAGES_COUNT
                )
            );

            return new GetQueueMetadataResult($maxCount, $metadata);
        }, null);
    }
public function getQueueMetadataAsync ( $ queueName , QueueServiceOptions $ options = null ) { Validate :: canCastAsString ( $ queueName , 'queueName' ) ; Validate :: notNullOrEmpty ( $ queueName , 'queueName' ) ; $ method = Resources :: HTTP_GET ; $ headers = array ( ) ; $ postParams = array ( ) ; $ queryParams = array ( ) ; $ path = $ queueName ; $ body = Resources :: EMPTY_STRING ; if ( is_null ( $ options ) ) { $ options = new QueueServiceOptions ( ) ; } $ this -> addOptionalQueryParam ( $ queryParams , Resources :: QP_COMP , 'metadata' ) ; return $ this -> sendAsync ( $ method , $ headers , $ queryParams , $ postParams , $ path , Resources :: STATUS_OK , $ body , $ options ) -> then ( function ( $ response ) { $ responseHeaders = HttpFormatter :: formatHeaders ( $ response -> getHeaders ( ) ) ; $ metadata = Utilities :: getMetadataArray ( $ responseHeaders ) ; $ maxCount = intval ( Utilities :: tryGetValue ( $ responseHeaders , Resources :: X_MS_APPROXIMATE_MESSAGES_COUNT ) ) ; return new GetQueueMetadataResult ( $ maxCount , $ metadata ) ; } , null ) ; }
Creates promise to return queue properties, including user-defined metadata.

@param string              $queueName The queue name.
@param QueueServiceOptions $options   The optional parameters.

@return \GuzzleHttp\Promise\PromiseInterface
Creates promise to return queue properties including user - defined metadata .