public function __construct($queueName, $receiptHandle, $visibilityTimeout) { parent::__construct('put', 'queues/' . $queueName . '/messages'); $this->queueName = $queueName; $this->receiptHandle = $receiptHandle; $this->visibilityTimeout = $visibilityTimeout; }
public function __construct($retNum = NULL, $prefix = NULL, $marker = NULL) { parent::__construct('get', 'queues'); $this->setRetNum($retNum); $this->setPrefix($prefix); $this->setMarker($marker); }
public function __construct(array $sendMessageRequestItems, $base64 = TRUE) { parent::__construct('post', NULL); $this->queueName = NULL; $this->sendMessageRequestItems = $sendMessageRequestItems; $this->base64 = $base64; }
public function __construct($numOfMessages, $waitSeconds = NULL) { parent::__construct('get', NULL); $this->queueName = NULL; $this->numOfMessages = $numOfMessages; $this->waitSeconds = $waitSeconds; }
public function __construct($messageBody, $messageAttributes = NULL) { parent::__construct('post', NULL); $this->topicName = NULL; $this->messageBody = $messageBody; $this->messageAttributes = $messageAttributes; }
public function __construct($topicName, $retNum = NULL, $prefix = NULL, $marker = NULL) { parent::__construct('get', 'topics/' . $topicName . '/subscriptions'); $this->topicName = $topicName; $this->setRetNum($retNum); $this->setPrefix($prefix); $this->setMarker($marker); }
public function __construct(UpdateSubscriptionAttributes $attributes = NULL) { parent::__construct('put', 'topics/' . $attributes->getTopicName() . '/subscriptions/' . $attributes->getSubscriptionName() . '?metaoverride=true'); if ($attributes == NULL) { $attributes = new UpdateSubscriptionAttributes(); } $this->attributes = $attributes; }
public function __construct(AccountAttributes $attributes = NULL) { parent::__construct('put', '/?accountmeta=true'); if ($attributes == NULL) { $attributes = new AccountAttributes(); } $this->attributes = $attributes; }
public function __construct($messageBody, $delaySeconds = NULL, $priority = NULL) { parent::__construct('post', NULL); $this->queueName = NULL; $this->messageBody = $messageBody; $this->delaySeconds = $delaySeconds; $this->priority = $priority; }
public function __construct($queueName, QueueAttributes $attributes = NULL) { parent::__construct('put', 'queues/' . $queueName . '?metaoverride=true'); if ($attributes == NULL) { $attributes = new QueueAttributes(); } $this->queueName = $queueName; $this->attributes = $attributes; }
public function __construct($topicName, TopicAttributes $attributes = NULL) { parent::__construct('put', 'topics/' . $topicName . '?metaoverride=true'); if ($attributes == NULL) { $attributes = new TopicAttributes(); } $this->topicName = $topicName; $this->attributes = $attributes; }
public static function SignRequest($accessKey, BaseRequest &$request) { $canonicalizedMNSHeaders = ""; $headers = $request->getHeaders(); $contentMd5 = ""; if (isset($headers['Content-MD5'])) { $contentMd5 = $headers['Content-MD5']; } $contentType = ""; if (isset($headers['Content-Type'])) { $contentType = $headers['Content-Type']; } $date = $headers['Date']; $queryString = $request->getQueryString(); $canonicalizedResource = $request->getResourcePath(); if ($queryString != NULL) { $canonicalizedResource .= "?" . $request->getQueryString(); } if (0 !== strpos($canonicalizedResource, "/")) { $canonicalizedResource = "/" . $canonicalizedResource; } $tmpHeaders = array(); foreach ($headers as $key => $value) { if (0 === strpos($key, Constants::MNS_HEADER_PREFIX)) { $tmpHeaders[$key] = $value; } } ksort($tmpHeaders); $canonicalizedMNSHeaders = implode("\n", array_map(function ($v, $k) { return $k . ":" . $v; }, $tmpHeaders, array_keys($tmpHeaders))); $stringToSign = strtoupper($request->getMethod()) . "\n" . $contentMd5 . "\n" . $contentType . "\n" . $date . "\n" . $canonicalizedMNSHeaders . "\n" . $canonicalizedResource; return base64_encode(hash_hmac("sha1", $stringToSign, $accessKey, $raw_output = TRUE)); }
private function addRequiredHeaders(BaseRequest &$request) { $body = $request->generateBody(); $queryString = $request->generateQueryString(); $request->setBody($body); $request->setQueryString($queryString); if ($body != NULL) { $request->setHeader('Content-Length', strlen($body)); } $request->setHeader('Date', gmdate(Constants::GMT_DATE_FORMAT)); if (!$request->isHeaderSet('Content-Type')) { $request->setHeader('Content-Type', 'text/xml'); } $request->setHeader(Constants::MNS_VERSION_HEADER, Constants::MNS_VERSION); $sign = Signature::SignRequest($this->accessKey, $request); $request->setHeader(Constants::AUTHORIZATION, Constants::MNS . " " . $this->accessId . ":" . $sign); }
public function __construct($queueName) { parent::__construct('get', 'queues/' . $queueName . '/messages?peekonly=true'); $this->queueName = $queueName; }
public function __construct($queueName, array $receiptHandles) { parent::__construct('delete', 'queues/' . $queueName . '/messages'); $this->queueName = $queueName; $this->receiptHandles = $receiptHandles; }
public function __construct() { parent::__construct('get', '/?accountmeta=true'); }
private function addRequiredHeaders(BaseRequest &$request) { $body = $request->generateBody(); $queryString = $request->generateQueryString(); $request->setBody($body); $request->setQueryString($queryString); if ($body != NULL) { $request->setHeader(Constants::CONTENT_LENGTH, strlen($body)); } $request->setHeader('Date', gmdate(Constants::GMT_DATE_FORMAT)); if (!$request->isHeaderSet(Constants::CONTENT_TYPE)) { $request->setHeader(Constants::CONTENT_TYPE, 'text/xml'); } $request->setHeader(Constants::MNS_VERSION_HEADER, Constants::MNS_VERSION); if ($this->securityToken != NULL) { $request->setHeader(Constants::SECURITY_TOKEN, $this->securityToken); } $sign = Signature::SignRequest($this->accessKey, $request); $request->setHeader(Constants::AUTHORIZATION, Constants::MNS . " " . $this->accessId . ":" . $sign); }
public function __construct($messageBody) { parent::__construct('post', NULL); $this->topicName = NULL; $this->messageBody = $messageBody; }
public function __construct($topicName, $subscriptionName) { parent::__construct('delete', 'topics/' . $topicName . '/subscriptions/' . $subscriptionName); $this->topicName = $topicName; $this->subscriptionName = $subscriptionName; }
public function __construct(SubscriptionAttributes $attributes) { parent::__construct('put', 'topics/' . $attributes->getTopicName() . '/subscriptions/' . $attributes->getSubscriptionName()); $this->attributes = $attributes; }
public function __construct($queueName) { parent::__construct('delete', 'queues/' . $queueName); $this->queueName = $queueName; }
public function __construct($topicName) { parent::__construct('get', 'topics/' . $topicName); $this->topicName = $topicName; }
public function __construct($queueName, $waitSeconds = NULL) { parent::__construct('get', 'queues/' . $queueName . '/messages'); $this->queueName = $queueName; $this->waitSeconds = $waitSeconds; }
public function __construct($queueName, $numOfMessages) { parent::__construct('get', 'queues/' . $queueName . '/messages'); $this->queueName = $queueName; $this->numOfMessages = $numOfMessages; }