Converts a queue URL into a queue ARN.

@param string $queueUrl The queue URL to perform the action on.
Retrieved when the queue is first created.

@return string An ARN representation of the queue URL.
333377
public function getQueueArn($queueUrl)
    {
        $queueArn = strtr($queueUrl, array(
            'http://'        => 'arn:aws:',
            'https://'       => 'arn:aws:',
            '.amazonaws.com' => '',
            '/'              => ':',
            '.'              => ':',
        ));

        // Cope with SQS' .fifo / :fifo arn inconsistency
        if (substr($queueArn, -5) === ':fifo') {
            $queueArn = substr_replace($queueArn, '.fifo', -5);
        }
        return $queueArn;
    }
725477
protected function _applySort($url)
    {
        if (!$this->_sortEnabled) {
            return $url;
        }

        if (!empty($this->request->getQuery('s'))) {
            $url['?']['s'] = $this->request->getQuery('s');
        }

        if (!empty($this->request->getQuery('d'))) {
            $url['?']['d'] = $this->request->getQuery('d');
        }

        return $url;
    }
69551
protected function buildUrl($url)
    {
        if (strpos($url, '://') || 0 === strpos($url, '/')) {
            return $url;
        } elseif ($url === '') {
            return $url;
        } else {
            return Url::build($url);
        }
    }
848433
static public function parseUrl($url)
    {
        $urlArr = parse_url($url);

        if (array_key_exists('scheme', $urlArr) && !array_key_exists('port', $urlArr)) {
            switch ($urlArr['scheme']) {
                case 'http':
                    $urlArr['port'] = 80;
                    break;
                case 'https':
                    $urlArr['port'] = 443;
                    break;
            }
        }

        return $urlArr;
    }
796784
private function doRandomDelay($url)
    {
        return array_reduce(
            $this->randomWaitUrls,
            function ($carry, $value) use ($url) {
                if ($carry !== true) {
                    return (strpos($url, $value) === 0);
                } else {
                    return $carry;
                }
            }
        );
    }
1122552
private function getStatusUrl($queueEvent)
    {
        // this has to be checked after cause we should not call getSubscribedWorkerIds() if above is true
        $workerIds = $this->getSubscribedWorkerIds($queueEvent);
        if (empty($workerIds)) {
            return '';
        }

        // we have subscribers; create the EventStatus entry
        /** @var EventStatus $eventStatus **/
        $eventStatus = new $this->eventStatusClassname();
        $eventStatus->setCreatedate(new \DateTime());
        $eventStatus->setEventname($queueEvent->getEvent());

        // if available, transport the ref document to the eventStatus instance
        if (!empty($queueEvent->getDocumenturl())) {
            $eventStatusResource = new $this->eventStatusEventResourceClassname();
            $eventStatusResource->setRef($this->extRefConverter->getExtReference($queueEvent->getDocumenturl()));
            $eventStatus->setEventresource($eventStatusResource);
        }

        foreach ($workerIds as $workerId) {
            /** @var \GravitonDyn\EventStatusBundle\Document\EventStatusStatus $eventStatusStatus **/
            $eventStatusStatus = new $this->eventStatusStatusClassname();
            $eventStatusStatus->setWorkerid($workerId);
            $eventStatusStatus->setStatus('opened');
            $eventStatus->addStatus($eventStatusStatus);
        }

        // Set username to Event
        $eventStatus->setUserid($this->getSecurityUsername());

        $this->documentManager->persist($eventStatus);
        $this->documentManager->flush();

        // get the url..
        $url = $this->router->generate(
            $this->eventStatusRouteName,
            [
                'id' => $eventStatus->getId()
            ],
            UrlGeneratorInterface::ABSOLUTE_URL
        );

        return $url;
    }
1276503
public static void deleteQueue(String queueURL) {
		if (!StringUtils.isBlank(queueURL)) {
			try {
				getClient().deleteQueue(new DeleteQueueRequest(queueURL));
			} catch (AmazonServiceException ase) {
				logException(ase);
			} catch (AmazonClientException ace) {
				logger.error("Could not reach SQS. {0}", ace.toString());
			}
		}
	}
1089956
protected function prepareUrl($url)
    {
        if (Str::startsWith($url, '/')) {
            $url = substr($url, 1);
        }

        if (! Str::startsWith($url, 'http')) {
            $url = sprintf("%s/%s", $this->baseUrl(), $url);
        }

        return trim($url, '/');
    }
1172699
public static function getAbsoluteUrl($url = null)
    {
        if (is_null($url)) {
            return '';
        }
        if (self::isUrl($url)) {
            return $url;
        }
        $url            = '/'.self::resolvePath($url);
        $current_url    = self::getRequestUrl(true, true);
        $curr           = substr($current_url, 0, strrpos($current_url, '/') );
        return $curr.$url;
    }
1135998
protected function _url($url = null) {
		if ($url !== null) {
			return '/' . trim($url, '/');
		} elseif ($uri = $this->env('REQUEST_URI')) {
			list($uri) = explode('?', $uri, 2);
			$base = '/^' . preg_quote($this->_base, '/') . '/';
			return '/' . trim(preg_replace($base, '', $uri), '/') ?: '/';
		}
		return '/';
	}
81774
private function getUrl(string $url): string
    {
        $urlParts = parse_url($url);

        if ($urlParts === false) {
            throw new \ParseError("Could not parse URL: $url");
        }

        if ($this->baseUrl !== null && ! isset($urlParts['host'])) {
            $url = $this->baseUrl . '/' . ltrim($url, '/');
        }

        return $url;
    }
1013692
public function setUrl(string $url = null)
    {
        $this->url = $url;

        if ($url !== null) {
            $this->callbackData = null;
            $this->switchInlineQuery = null;
        }

        return $this;
    }
1110978
private function &getHandle($url) {
      $http = curl_init();

      curl_setopt($http, CURLOPT_USERAGENT, Client::getUserAgent());
      curl_setopt($http, CURLOPT_RETURNTRANSFER, true);
      curl_setopt($http, CURLOPT_URL, $url);

      return $http;
    }
540478
protected function getUrlContents(string $url): string
    {
        $request = $this->getRequest($url);

        return $this->getParsedResponse($request);
    }
410098
public function getQueue($queuePath)
    {
        $httpCallContext = new HttpCallContext();
        $httpCallContext->setPath($queuePath);
        $httpCallContext->setMethod(Resources::HTTP_GET);
        $httpCallContext->addStatusCode(Resources::STATUS_OK);
        $response = $this->sendHttpContext($httpCallContext);
        $queueInfo = new QueueInfo();
        $queueInfo->parseXml($response->getBody());

        return $queueInfo;
    }
144600
protected function queueRequests( $urls ) {
		$this->curlQueue = [];
		if ( $this->queuedTesting === false ) {
			$this->curlQueue[] = $urls;

			return;
		}
		foreach ( $urls as $url ) {
			$domain = $this->parseURL( $url )['host'];
			$queuedUrl = false;
			$queueIndex = -1;
			foreach ( $this->curlQueue as $queueIndex => $urlList ) {
				if ( $queuedUrl === false && !isset( $urlList[$domain] ) ) {
					$this->curlQueue[$queueIndex][$domain] = $url;
					$queuedUrl = true;
				}
			}
			if ( $queuedUrl === false ) {
				$this->curlQueue[++$queueIndex][$domain] = $url;
			}
		}
	}
847631
private function resolveEndpoint($queueName)
    {
        if (isset($this->queueMap[$queueName])) {
            return $this->queueMap[$queueName];
        }

        return '/_ah/queue/'.$queueName;
    }