@param string $url

@return Collection
170972
private function executeQuery(string $url): AddressCollection
    {
        $fields = $this->fieldsForService($this->service);
        $content = $this->getUrlContents($url);
        $data = str_getcsv($content);

        if (in_array(end($data), ['INVALID_LICENSE_KEY', 'LICENSE_REQUIRED'])) {
            throw new InvalidCredentials('API Key provided is not valid.');
        }

        if ('IP_NOT_FOUND' === end($data)) {
            return new AddressCollection([]);
        }

        if (count($fields) !== count($data)) {
            throw InvalidServerResponse::create($url);
        }

        $data = array_combine($fields, $data);
        $data = array_map(function ($value) {
            return '' === $value ? null : $value;
        }, $data);

        if (empty($data['country']) && !empty($data['countryCode'])) {
            $data['country'] = $this->countryCodeToCountryName($data['countryCode']);
        }

        $data = $this->replaceAdmins($data);
        $data['providedBy'] = $this->getName();

        return new AddressCollection([Address::createFromArray($data)]);
    }
1230140
final public function collection($name = '')
    {
        return new self($this->collection, $this->name.$name, $this, $this->prefixes);
    }
506974
protected function processURL(string $url) : array
    {
        $url = trim($url, '/');
        $url_array = explode('/', $url);
        return $url_array;
    }
840837
protected function parse($url)
    {
        $html = $this->get($url)->getBody()->getContents();

        $parser = $this->getParser($html);

        return $parser;
    }
650195
public function setUrl(string $url)
    {
        $this->url = $url;
        $this->connection = curl_init($url);

        return $this;
    }
1080643
public function setUrl($url)
    {
        $relation = new RelationLink();
        $relation
            ->setRelationType('self')
            ->setUrl($url);
        return $this->setRelation($relation);
    }
132092
public function setUrl( $url )
    {
        // Only set cell value for single cells
        if (!str_contains( $this->cells, ':' )) {
            $this->sheet->getCell( $this->cells )->getHyperlink()->setUrl( $url );
        }

        return $this;
    }
692734
private function executeQuery(string $url): AddressCollection
    {
        $content = $this->getUrlContents($url);
        $data = json_decode($content, true);

        if (empty($data) || 'OK' !== $data['statusCode']) {
            return new AddressCollection([]);
        }

        $timezone = null;
        if (isset($data['timeZone'])) {
            $timezone = timezone_name_from_abbr('', (int) substr($data['timeZone'], 0, strpos($data['timeZone'], ':')) * 3600, 0);
        }

        return new AddressCollection([
            Address::createFromArray([
                'providedBy' => $this->getName(),
                'latitude' => $data['latitude'] ?? null,
                'longitude' => $data['longitude'] ?? null,
                'locality' => $data['cityName'] ?? null,
                'postalCode' => $data['zipCode'] ?? null,
                'adminLevels' => isset($data['regionName']) ? [['name' => $data['regionName'], 'level' => 1]] : [],
                'country' => $data['countryName'] ?? null,
                'countryCode' => $data['countryName'] ?? null,
                'timezone' => $timezone,
            ]),
        ]);
    }
657645
public function setUrl($url)
    {
        // validate url
        if (filter_var($url, FILTER_VALIDATE_URL)) {
            $this->url = $url;
        } else {
            throw new InvalidUrlException('"' . $url . '" is not a valid URL');
        }

        return $this;
    }
300209
public function setUrl($url)
    {
        if (strpos($url, '/') !== 0) {
            $url = '/' . $url;
        }
        $this->url = $url;
        return $this;
    }
918811
public function get($url)
    {
        $url = new Url($url);
        $location = $this->branches->getUrlManager()->urlMatches($url);

        if ($location === false) {
            $resolution = new NotFoundResolution();
        } else {
            $url = $location->getUrl();
            $realPath = $location->getPath();

            if (Branches::isDirectoryValid($realPath)) {
                $post = $this->branches->getPostProvider()->provide($url, $realPath);
                $resolution = new PostResolution($post);
            } elseif (Branches::isFileValid($realPath)) {
                $file = $this->branches->getFileProvider()->provide($url, $realPath);
                $resolution = new FileResolution($file);
            } else {
                $resolution = new NotFoundResolution();
            }
        }

        $result = $this->branches->getResolutionManager()->resolve($this->branches->getResolutionManager()->filterResolution($url, $resolution));

        if (null === $result) {
            throw new NodeNotFoundException($url);
        }

        return $result;
    }
955612
private function executeQuery(string $url): AddressCollection
    {
        $content = $this->getUrlContents($url);
        $data = json_decode($content, true);

        if (!$data) {
            return new AddressCollection([]);
        }

        // Return empty collection if address was not found
        if (null === $data['lat']
        && null === $data['lng']
        && '(Unknown City?)' === $data['city']
        && '(Unknown Country?)' === $data['country_name']
        && 'XX' === $data['country_code']) {
            return new AddressCollection([]);
        }

        // Return empty collection if address was not found
        if (null === $data['lat']
        && null === $data['lng']
        && '(Private Address)' === $data['city']
        && '(Private Address)' === $data['country_name']
        && 'XX' === $data['country_code']) {
            return new AddressCollection([]);
        }

        return new AddressCollection([
            Address::createFromArray([
                'providedBy' => $this->getName(),
                'latitude' => $data['lat'],
                'longitude' => $data['lng'],
                'locality' => $data['city'],
                'country' => $data['country_name'],
                'countryCode' => $data['country_code'],
            ]),
        ]);
    }
605232
public static function fromUrl($url)
    {
        $elements = parse_url($url);
        $elements['pathinfo'] = isset($elements['path']) ? $elements['path'] : '';

        if (isset($elements['query'])) {
            parse_str($elements['query'], $queryParams);
            $elements['queryParams'] = $queryParams;
        }

        // Remove unwanted keys returned by parse_url() so that we don't have them as properties.
        unset($elements['path'], $elements['query'], $elements['user'], $elements['pass'], $elements['fragment']);

        return new static($elements);
    }
812696
public function extract($dom, $url)
    {
        $this->resetUrls();
        $crawler = new DomCrawler($dom, $url);
        $links = $crawler->filter('body a')->links();

        foreach ($links as $link) {
            if (!in_array($link->getUri(), $this->urls)) {
                $this->urls[] = $link->getUri();
            }
        }

        return $this->urls;
    }
297413
public static function factory($url)
    {
        static $defaults = array('scheme' => null, 'host' => null, 'path' => null, 'port' => null, 'query' => null,
            'user' => null, 'pass' => null, 'fragment' => null);

        if (false === ($parts = parse_url($url))) {
            throw new InvalidArgumentException('Was unable to parse malformed url: ' . $url);
        }

        $parts += $defaults;

        // Convert the query string into a QueryString object
        if ($parts['query'] || 0 !== strlen($parts['query'])) {
            $parts['query'] = QueryString::fromString($parts['query']);
        }

        return new static($parts['scheme'], $parts['host'], $parts['user'],
            $parts['pass'], $parts['port'], $parts['path'], $parts['query'],
            $parts['fragment']);
    }
25025
public function load($url)
    {
        $masterRequest = $this->requestStack->getMasterRequest();
        $request = Request::create($url, 'GET', array(), $masterRequest->cookies->all(), array(), $masterRequest->server->all());
        if ($masterRequest->getSession()) {
            $request->setSession($masterRequest->getSession());
        }

        $response = $this->kernel->handle($request, HttpKernelInterface::SUB_REQUEST, false);

        return $response->getContent();
    }
281768
protected static function _applyUrlFilters($url)
    {
        $request = static::getRequest(true);
        $e = null;
        foreach (static::$_urlFilters as $filter) {
            try {
                $url = $filter($url, $request);
            } catch (Exception $e) {
                // fall through
            } catch (Throwable $e) {
                // fall through
            }
            if ($e !== null) {
                if (is_array($filter)) {
                    $ref = new ReflectionMethod($filter[0], $filter[1]);
                } else {
                    $ref = new ReflectionFunction($filter);
                }
                $message = sprintf(
                    'URL filter defined in %s on line %s could not be applied. The filter failed with: %s',
                    $ref->getFileName(),
                    $ref->getStartLine(),
                    $e->getMessage()
                );
                throw new RuntimeException($message, $e->getCode(), $e);
            }
        }

        return $url;
    }