{@inheritdoc}

@param string|UrlContract $nameOrUrl

@return Connection

@throws HandlerNotFoundException
971802
public function connection($nameOrUrl=null)
    {
        $nameOrUrl = $nameOrUrl ?: $this->defaultConnectionName();
        $key = (string)$nameOrUrl;

        if (isset($this->connections[$key])) {
            return $this->connections[$key];
        }

        $connection = $this->callUntilNotNull([$nameOrUrl]);

        if (!$connection instanceof Connection) {
            throw new HandlerNotFoundException("No handler found to create connection '$nameOrUrl'");
        }

        // Assign the created connection to the name AND its url to always
        // return the same connection for one url
        $this->connections[$key] = $connection;
        $this->connections[(string)$connection->url()] = $connection;

        return $connection;
    }
66190
function get($url, $callback = null)
    {
        $ret = new CoURLResult($url, $callback, $this->handle);
        $ret->method = self::METHOD_GET;
        $this->requests[$ret->id] = $ret;
        return $ret;
    }
894484
public static function getRelativeUrl($url = null) {
        $url = is_null($url) ? '/'.ltrim($_SERVER['REQUEST_URI'], '/') : $url;
        $rootUrlPath	= parse_url(ROOT_URL, PHP_URL_PATH);
        $absPath		= parse_url($url, PHP_URL_PATH);
        if (substr($absPath, 0, strlen($rootUrlPath)) != $rootUrlPath ) {
            throw new ResolverException('Request Uri '.$url.' outside of TAO path '.ROOT_URL);
        }
        if ($absPath === $rootUrlPath) {
            $result = '';
        } else {
            $result = substr($absPath, strlen($rootUrlPath));
        }
        return $result;
    }
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;
    }
293972
public function connection($name = null)
    {
        if (is_null($name)) {
            $name = $this->getDefaultConnection();
        }

        if (! isset($this->connections[$name])) {
            throw new InvalidArgumentException("Connection [{$name}] is not registered.");
        }

        return $this->connections[$name];
    }
256252
public function forget($keyOrValue)
    {

        $key = is_scalar($keyOrValue) ? $keyOrValue : null;

        $tags = [];

        if (!$key) {
            $key = $this->categorizer->key($keyOrValue);
            $tags = $this->categorizer->tags($keyOrValue);
        }

        if (!$key) {
            throw new HandlerNotFoundException("No categorizer found a key for " . Type::of($keyOrValue));
        }

        $this->callBeforeListeners('forget', [$this->storageName, $key, $tags]);
        $this->storage->forget($this->storage->escape($key));

        if ($tags) {
            $this->prune($tags);
        }

        $this->callAfterListeners('forget', [$this->storageName, $key, $tags]);

        return $this;
    }
409858
public function detachConnFromUrl(ClientConnection $conn, $url)
    {
        if (isset($this->servConnFree[$url])) {
            $this->servConnFree[$url]->detach($conn);
        }
        if (isset($this->servConn[$url])) {
            $this->servConn[$url]->detach($conn);
        }
    }
631922
public function callHandler($handler_id, $name, array $arguments = array())
    {
        return Handler::call($this->getHandlers(), $handler_id, $name, $arguments);
    }
578931
protected function getUrlConcrete($name, $options)
    {
        try {
            return new UrlConcrete(
                $this->getRouteUri($name),
                $options['lastmod'],
                $options['changefreq'],
                $options['priority']
            );
        } catch (\Exception $e) {
            throw new \InvalidArgumentException(
                sprintf(
                    'Invalid argument for route "%s": %s',
                    $name,
                    $e->getMessage()
                ),
                0,
                $e
            );
        }
    }
70235
private function getUrlGenerator($sourceUrl)
    {
        foreach ($this->urlGenerators as $urlGenerator) {
            if ($urlGenerator->supports($sourceUrl)) {
                return $urlGenerator;
            }
        }

        return null;
    }
318599
public function connection(string $name = null): Connection
    {
        $name = $name ?? $this->getDefaultConnection();

        if (! isset($this->connections[$name])) {
            throw new InvalidArgumentException("Connection [$name] not configured.");
        }

        return $this->connections[$name];
    }
33817
public static function xmlrpcClient($url, $options = null, $transport = null) 
	{
		$options['version'] = 'xmlrpc';
		return self::client($url, $options, $transport);
	}
139553
public function getHandler($identifier)
    {
        if (isset($this->metaTagHandlers[$identifier])) {
            return $this->metaTagHandlers[$identifier];
        }

        throw new HandlerNotFoundException($identifier);
    }
1088801
public function deleteUrl($name, $url)
    {
        $this->arguments[] = 'set-url';
        $this->arguments[] = '--delete';
        $this->arguments[] = $name;
        $this->arguments[] = $url;
        return $this;
    }
1318729
public function get($url, array $data = [], array $headers = [], $cacheMinutes = 0, HttpExceptionHandler $handler = null)
    {
        return $this->send('get', $url, $data, $headers, $cacheMinutes, $handler);
    }
111885
public static function _createFromServer($name, $url)
    {
        $file = new AVFile();
        $file->name = $name;
        $file->url = $url;

        return $file;
    }
208964
public function ignoreJs($aliasOrUrl)
    {
        if (is_array($aliasOrUrl)) {
            foreach ($aliasOrUrl as $item) {
                $this->ignoreJs($item);
            }
            return $this;
        }
        $url = $this->getJsUrl($aliasOrUrl);
        if (!$this->included->isIncluded($url)) {
            $this->included->markAsIncluded($url);
        }
        return $this;
    }