Return, or update, current standard objects value.

@param null|string $url

@return mixed
439392
public function val($url = null)
    {
        if($this->isNull($url)) {
            return $this->value;
        }

        $this->value = $url;
        $this->validateUrl();

        return $this;
    }
1249267
public function setUrl( $url )
    {
        if( $url==null )
        {
            return null;
        }

        $urlParts = parse_url( $url );

        $this->scheme = $urlParts['scheme'];
        $this->host = $urlParts['host'];
        $this->user = $urlParts['user'];
        $this->password = $urlParts['pass'];
        $this->path = $urlParts['path'];
        $this->query = $urlParts['query'];
        $this->fragment = $urlParts['fragment'];
        $this->port = $urlParts['port'];

        return $this;
    }
952953
public function download($url)
	{
		$getResult = $this->session->get($url);

		if (!$getResult->success) {
			$this->error = array();
			$this->error['file'] = 'Download error (HTTP status: ' . $getResult->status_code . ')';
			$this->error['http'] = $getResult->status_code;
			return null;
		}
		return $getResult->body;
	}
300628
protected function request($url)
	{
		$response = null;
		try {
			$response = $this->getHttpClient()
				->get($url)
				->send();
		} catch (ClientErrorResponseException $e) {
			return Json::encode([
				'error' => $e->getMessage()
			]);
		}

		return $response->json();
	}
12248
public static function getProtocol($url)
    {
        $urlInfo = static::info($url);

        return ArrayHelper::get($urlInfo, 'protocol', null, true);
    }
1137363
public function currentUrl()
    {
        $context = $this->contextObject();

        if ($context && isset($context['url'])) {
            return $this->createAbsoluteUrl($context['url']);
        }

        return null;
    }
407020
public function queryString($url = null)
    {
        $query = '';

        if (!$url)
        {
            $url = $this->server('request_uri');
        }

        $position = mb_strpos($url, '?');

        if ($position !== false)
        {
            $query = mb_substr($url, $position + 1);
        }

        return $query;
    }
520311
public function getDesiredUrl(?string $url = null)
  {
    if (isset($_GET['url'])) {
      $url = $_GET['url'] . (count($_GET) > 0 ? '?' : '');
      unset($_GET['url']);

      foreach ($_GET as $key => $value) {
        $url .= (ends_with($url, '?') ? '' : '&') . $key . '=' . $value;
      }
    }

    if ($url != null) return $url;
    return false;
  }
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;
    }
988540
static public function rUrl($url)
    {
        $module = null;
        if (strpos($url, 'http') !== 0 && ($pos = strpos($url, ':')) !== false) {    // 1. "x:a/b" module or xUrl
            $module = trim(substr($url, 0, $pos), '/');
            $url   = trim(substr($url, $pos + 1), '/');
        }
        
        if (strpos($url, 'http') === 0) {
            $url = str_replace(static::url($module . ':'), '', $url);
        }
        
        return trim($url, '/');
    }
62700
public static function normalizeURL($url)
  {
    $url_parts = self::splitURL($url);
    
    if ($url_parts == null) return null;
    
    $url_normalized = self::buildURLFromParts($url_parts, true);
    return $url_normalized;
  }
710498
public function getPagination($url)
    {
        $gets = null;
        $gets = $this->gets;
        $page = $this->page;
        $gets['pageSize'] = $this->pageSize;
        if ($page > 1) {
            $gets['page'] = 1;
            $newUrl = URLUtil::addParameter($url, $gets);
            $laquo = "<li><a href=\"{$newUrl}\">&laquo;</a></li>";
            $gets['page'] = $page - 1;
            $newUrl = URLUtil::addParameter($url, $gets);
            $left = "<li><a href=\"{$newUrl}\">&lt;</a></li>";
        } else {
            $laquo = "<li class=\"disabled\"><a href='#'>&laquo;</a></li>";
            $left = "<li class=\"disabled\"><a href='#'>&lt;</a></li>";
        }
        if ($page < $this->total) {
            $gets['page'] = $this->total;
            $newUrl = URLUtil::addParameter($url, $gets);
            $raquo = "<li><a href=\"{$newUrl}\">&raquo;</a></li>";
            $gets['page'] = $page + 1;
            $newUrl = URLUtil::addParameter($url, $gets);
            $right = "<li><a href=\"{$newUrl}\">&gt;</a></li>";
        } else {
            $raquo = "<li class=\"disabled\"><a href='#'>&raquo;</a></li>";
            $right = "<li class=\"disabled\"><a href='#'>&gt;</a></li>";
        }

        $otherPages = [];
        $start = 1;
        if ($this->total > 5) {
            $start = $page;
            while (true) {
                if ($start - 2 >= 1 && $start + 2 <= $this->total) {
                    break;
                } else if ($start - 2 <= 1) {
                    $start++;
                } else if ($start + 2 >= $this->total) {
                    $start--;
                }
            }
            $end = $start + 2;
            $start -= 2;
        } else {
            $end = $this->total;
        }
        for ($i = $start; $i <= $end; $i++) {
            if ($page == $i) {
                $otherPages[] = "<li class=\"active\"><a href=\"#\">{$i}</a></li>";
            } else {
                $gets['page'] = $i;
                $newUrl = URLUtil::addParameter($url, $gets);
                $otherPages[] = "<li><a href=\"{$newUrl}\">{$i}</a></li>";
            }
        }

        array_unshift($otherPages, $left);
        array_unshift($otherPages, $laquo);
        array_push($otherPages, $right);
        array_push($otherPages, $raquo);
        $html = '<ul class="pagination">' . join("\n", $otherPages) . '</ul>';
        return $html;
    }
145569
public function downloadFileFromURL($url)
    {
        $request     = new \Google_Http_Request($url, 'GET', null, null);
        $httpRequest = $this->service->getClient()
           ->getAuth()
           ->authenticatedRequest($request);
        if ($httpRequest->getResponseHttpCode() == 200) {
            return $httpRequest->getResponseBody();
        } else {
            // An error occurred.
            return null;
        }
    }
782631
public function get($url, $params = null) {
    $this->params = $params;
    $this->method = 'GET';
    $this->url = $url;

    return $this->request();
  }
217368
public function open($url = null)
    {
        $this->handle = curl_init($url);

        return $this->handle !== false;
    }
44511
public function getPage($url)
    {
        $pages = $this->getPages();
        $url = $this->normalizeUrl($url);

        if (!isset($pages[$url])) {
            return null;
        }


        $record = $pages[$url];

        foreach ($this->getEntities() as $entity) {
            if (strpos($record['filepath'], $entity->getPath()) !== false) {
                $page =  Injector::inst()->create(
                    $record['type'],
                    $entity,
                    $record['basename'],
                    $record['filepath']
                );

                return $page;
            }
        }
    }
990418
public function getCorsOrigin($url = null) {
        if (is_null($url)) {
            $baseUrl = Mage::getBaseUrl();
        } else {
            $baseUrl = $url;
        }
        $path = parse_url($baseUrl, PHP_URL_PATH);
        $domain = parse_url($baseUrl, PHP_URL_HOST);
        // there has to be a better way to just strip the path off
        return substr($baseUrl, 0,
            strpos($baseUrl, $path,
                strpos($baseUrl, $domain)));
    }