Set the item to be a insecure url.

@param string $url
@param array  $parameters

@return HnhDigital\NavigationBuilder\Item
559031
public function insecureUrl($url, ...$parameters)
    {
        $this->link_type = self::LINK_INSECURE_URL;
        $this->link_value = [$url, $parameters];
        $this->checkActive();

        return $this;
    }
284595
protected function authenticate($url, $method, $parameters = [])
    {
        // Setup authentication.
        if ($this->isSsl()) {
            $basicAuth  = new BasicAuth(
                $this->ch,
                $this->consumerKey,
                $this->consumerSecret,
                $this->options->isQueryStringAuth(),
                $parameters
            );
            $parameters = $basicAuth->getParameters();
        } else {
            $oAuth      = new OAuth(
                $url,
                $this->consumerKey,
                $this->consumerSecret,
                $this->options->getVersion(),
                $method,
                $parameters,
                $this->options->oauthTimestamp()
            );
            $parameters = $oAuth->getParameters();
        }

        return $parameters;
    }
455520
public function updateURLWithParameters($url, array $params)
    {
        if (empty($params)) {
            return $url;
        }

        $parts = parse_url($url);

        $scheme = isset($parts['scheme']) ? $parts['scheme'] : null;
        if ($scheme) {
            $scheme .= ':';
        }

        $host = isset($parts['host']) ? $parts['host'] : null;
        if ($host) {
            $host = "//$host";
        }
        $path = isset($parts['path']) ? $parts['path'] : null;

        //Merge parameters
        $query = isset($parts['query']) ? $parts['query'] : null;
        $params += $this->getParameterFromQuery($query);
        if (!empty($params)) {
            $query = '?' . http_build_query($params);
        }

        $fragment = isset($parts['fragment']) ? $parts['fragment'] : null;
        if ($fragment) {
            $fragment = "#$fragment";
        }

        return "{$scheme}{$host}{$path}{$query}$fragment";
    }
62008
public function setUrl($url)
    {
        $this->meta()->setUrl($url);
        $this->openGraph()->setUrl($url);

        return $this;
    }
206613
public static function normalize(string $url, array $parameters = []):string
    {
        $normalizedUrl = $url;
        if (!empty($parameters)) {
            $normalizedUrl .= (false !== strpos($url, '?') ? '&' : '?') . http_build_query($parameters, '', '&');
        }
        return $normalizedUrl;
    }
1129819
public function url($route, $parameters = array())
    {
        return $this->silex['url_generator']->generate($route, $parameters, \Symfony\Component\Routing\Generator\UrlGeneratorInterface::ABSOLUTE_URL);
    }
587546
static public function secureUrl($url, $params = []) {
        if (is_array($url)) {
            $url = implode("/", $url);
        }
        $headers = [
            "Authorization: Bearer " . JWT::getInternalToken()
        ];
        $opts = [
            "http" => [
                "method" => "GET",
                "header" => implode("\r\n", $headers)
            ],
            "ssl" => array(
                "verify_peer" => false,
                "verify_peer_name" => false,
            )
        ];
        $stream_context = stream_context_create($opts);
        if (count($params)) {
            $url = $url . "?" . http_build_query($params);
        }
        syslog(LOG_INFO, __METHOD__ . " fetching: " . $url);
        $content = file_get_contents($url, false, $stream_context);
        $result = json_decode($content, JSON_OBJECT_AS_ARRAY);
        return $result;
    }
857296
public function get($url, $parameters = [])
    {
        $query = $this->buildQuery($url, $parameters);
        $url = static::LOCATION.$url.(strpos($url, '?') !== false ? '&' : '?').$query;
        $headers = $this->buildHeaders();

        $request = $this->requestProvider->createRequest('GET', $url, $headers);
        $response = $this->client->send($request);

        // Throw any errors we have before continuing
        $this->errorCheckResponse($response);

        return json_decode($this->streamToString($response->getBody()));
    }
579992
public function setURL($url)
    {
        if (!$this->validateURL($url)) {
            throw new \InvalidArgumentException(sprintf('The URL "%s" is invalid.', $url));
        }

        $this->url = $url;
        $this->endpoint = null;
    }
520698
private function rawRequest($url, $parameters = [])
    {
        $request = new OAuth2Request($this->oauth2);

        $request->setUrl($url);
        $request->setParams($parameters);

        return $request->executeRequest();
    }
1204681
private function makeUri($url, $params = array())
    {
        $uri = \GuzzleHttp\uri_template($this->endpoint, array_merge($this->defaults, $params));
        $uri = new Psr7\Uri($uri);

        // All arguments must be urlencoded (as per RFC 1738).
        $query = Psr7\build_query($params, PHP_QUERY_RFC1738);
        $uri = $uri->withQuery($query);

        return Psr7\Uri::withQueryValue($uri, 'url', $url);
    }
837746
public function post($url, $parameters = []) {
        $this->setURL($url);
        $this->setOption(CURLOPT_POST, true);
        $this->setRequestMethod('POST');
        $this->setPostFields($parameters);
        $this->setPost(true);

        return $this->run();
    }
521959
protected function parseUrl($url, $parameters)
    {
        // If provided $url is a route name...
        if ($this->route->has($url)) {
            $url = $this->url->route($url, $parameters);
        } else {
            $url = $this->url->to($url, $parameters);
        }

        return $url;
    }
942978
public function redirectTo($url, $parameters = [], $secure = null)
    {
        $this->url = url($url, $parameters, $secure);

        return $this;
    }
309698
public static function urlLink($text, $url, $parameters = [], $secure = null)
    {
        return $this->createElement('a')->text($text)
            ->href(url($url, $parameters, $secure));
    }
1234124
public function setUrl(string $url = '#'): ButtonInterface
    {
        if ($this->isVisibility()) {
            //            if($this->url !== null) {
            //                if(strpos($this->url, '://') !== false) {
            //                    return $this;
            //                }
            //            }
            $this->url = $url;
        }

        return $this;
    }
1073144
private function buildUrl($url, $parameters)
    {
        $prams_former = '?';

        foreach ($parameters as $key => $value) {
            $prams_former = $prams_former.$key.'='.$value.'&';
        }

        return $url.substr($prams_former, 0, -1);
    }