Gets current uri content dimension parameters

@return type
773675
private function getCurrentContentDimension()
    {
        $current = Route::current();
        if (is_null($current)) {
            return [];
        }
        $uri        = uri();
        $dimensions = app('config')->get("antares/ui-components::dimensions");
        return (isset($dimensions[$uri])) ? $dimensions[$uri] : [];
    }
31439
public function getContentLength()
    {
        if (null !== $this->requestStack && null !== $request = $this->requestStack->getCurrentRequest()) {
            return $request->server->get('CONTENT_LENGTH');
        }

        return isset($_SERVER['CONTENT_LENGTH'])
            ? (int) $_SERVER['CONTENT_LENGTH']
            : null;
    }
154740
public function parseUri()
    {
        $uri = parse_url($_SERVER["REQUEST_URI"], PHP_URL_PATH);
        $uri = str_replace(['{', '}'], '', urldecode($uri));
        $extDir = dirname(dirname($_SERVER['SCRIPT_NAME']));
        $uri = str_replace($extDir, '', $uri);
        $uri = rtrim($uri, '/');
        $uri = empty($uri) ? '/' : $uri;
        $serverRequestMethod = $_SERVER['REQUEST_METHOD'];
        $params = $GLOBALS['_'.$serverRequestMethod];
        if(!empty($_SERVER['HTTPS']) && ('on' == $_SERVER['HTTPS'])) {
            $https = true;
        }
        else {
            $https = false;
        }
        $host = $_SERVER['HTTP_HOST'].str_replace('\\', '/', $extDir);
        $ip = $_SERVER['REMOTE_ADDR'];
        
        if($serverRequestMethod === 'POST') {
            $params = ['GET' => $_GET, 'POST' => $params];
        }
        else {
            $params = ['GET' => $params, 'POST' => []];
        }

        return ['uri' => $uri, 'params' => $params, 'method' => $serverRequestMethod, 'https' => $https, 'host' => $host, 'ip' => $ip];
    }
632325
public function dimensions()
	{
		if (!$this->dimensions)
		{
			$this->dimensions = array(0, 0);

			if ($this->isImage() && file_exists($this->path()))
			{
				$this->dimensions = getimagesize($this->path());
			}
		}

		return $this->dimensions;
	}
293630
public static function URI(){
    switch(true){
      case !empty($_SERVER['REQUEST_URI']):    $serv_uri = $_SERVER['REQUEST_URI']; break;
      case !empty($_SERVER['ORIG_PATH_INFO']): $serv_uri = $_SERVER['ORIG_PATH_INFO']; break;
      case !empty($_SERVER['PATH_INFO']):      $serv_uri = $_SERVER['PATH_INFO']; break;
      default:                                 $serv_uri = '/'; break;
    }
    $uri = rtrim(strtok($serv_uri,'?'),'/') ?: '/';
    return Filter::with('core.request.URI', $uri) ?: '/';
  }
810439
protected function getDimensions()
    {
        // Default result
        $result = [0, 0];

        // If we have a resource already loaded, this means we have modified the resource since the
        // original image was loaded. This means the "Variant" tuple key is out of date, and we don't
        // have a reliable cache key to load from, or save to. If we use the original tuple as a key,
        // we would run the risk of overwriting the original dimensions in the cache, with the values
        // of the resized instead.
        // Instead, we use the immediately available dimensions attached to this resource, and we will
        // rely on cache warming in writeToStore to save these values, where the "Variant" becomes available,
        // before the next time this variant is loaded into memory.
        $resource = $this->image;
        if ($resource) {
            return $this->getResourceDimensions($resource);
        }

        // Check if we have a container
        $container = $this->getAssetContainer();
        if (!$container) {
            return $result;
        }

        // Check cache for unloaded image
        $cache = $this->getCache();
        $key = $this->getDimensionCacheKey($container->getHash(), $container->getVariant());
        if ($cache->has($key)) {
            return $cache->get($key);
        }

        // Cache-miss
        $resource = $this->getImageResource();
        if ($resource) {
            $result = $this->getResourceDimensions($resource);
            $cache->set($key, $result);
        }
        return $result;
    }
33558
public static function uri()
	{
		if (static::$detected_uri !== null)
		{
			return static::$detected_uri;
		}

		if (\Fuel::$is_cli)
		{
			if ($uri = \Cli::option('uri') !== null)
			{
				static::$detected_uri = $uri;
			}
			else
			{
				static::$detected_uri = \Cli::option(1);
			}

			return static::$detected_uri;
		}

		// We want to use PATH_INFO if we can.
		if ( ! empty($_SERVER['PATH_INFO']))
		{
			$uri = $_SERVER['PATH_INFO'];
		}
		// Only use ORIG_PATH_INFO if it contains the path
		elseif ( ! empty($_SERVER['ORIG_PATH_INFO']) and ($path = str_replace($_SERVER['SCRIPT_NAME'], '', $_SERVER['ORIG_PATH_INFO'])) != '')
		{
			$uri = $path;
		}
		else
		{
			// Fall back to parsing the REQUEST URI
			if (isset($_SERVER['REQUEST_URI']))
			{
				$uri = strpos($_SERVER['SCRIPT_NAME'], $_SERVER['REQUEST_URI']) !== 0 ? $_SERVER['REQUEST_URI'] : '';
			}
			else
			{
				throw new \FuelException('Unable to detect the URI.');
			}

			// Remove the base URL from the URI
			$base_url = parse_url(\Config::get('base_url'), PHP_URL_PATH);
			if ($uri != '' and strncmp($uri, $base_url, strlen($base_url)) === 0)
			{
				$uri = substr($uri, strlen($base_url) - 1);
			}

			// If we are using an index file (not mod_rewrite) then remove it
			$index_file = \Config::get('index_file');
			if ($index_file and strncmp($uri, $index_file, strlen($index_file)) === 0)
			{
				$uri = substr($uri, strlen($index_file));
			}

			// When index.php? is used and the config is set wrong, lets just
			// be nice and help them out.
			if ($index_file and strncmp($uri, '?/', 2) === 0)
			{
				$uri = substr($uri, 1);
			}

			// decode the uri, and put any + back (does not mean a space in the url path)
			$uri = str_replace("\r", '+', urldecode(str_replace('+', "\r", $uri)));

			// Lets split the URI up in case it contains a ?.  This would
			// indicate the server requires 'index.php?' and that mod_rewrite
			// is not being used.
			preg_match('#(.*?)\?(.*)#i', $uri, $matches);

			// If there are matches then lets set set everything correctly
			if ( ! empty($matches))
			{
				$uri = $matches[1];

				// only reconstruct $_GET if we didn't have a query string
				if (empty($_SERVER['QUERY_STRING']))
				{
					$_SERVER['QUERY_STRING'] = $matches[2];
					parse_str($matches[2], $_GET);
					$_GET = \Security::clean($_GET);
				}
			}
		}

		// Deal with any trailing dots
		$uri = rtrim($uri, '.');

		// Do we have a URI and does it not end on a slash?
		if ($uri and substr($uri, -1) !== '/')
		{
			// Strip the defined url suffix from the uri if needed
			$ext = strrchr($uri, '.');
			$path = $ext === false ? $uri : substr($uri, 0, -strlen($ext));

			// Did we detect something that looks like an extension?
			if ( ! empty($ext))
			{
				// if it has a slash in it, it's a URI segment with a dot in it
				if (strpos($ext,'/') === false)
				{
					static::$detected_ext = ltrim($ext, '.');

					if (\Config::get('routing.strip_extension', true))
					{
						$uri = $path;
					}
				}
			}
		}

		// Do some final clean up of the uri
		static::$detected_uri = \Security::clean_uri($uri, true);

		return static::$detected_uri;
	}
766136
public function _uri() {
        //处理requestUri
        $requestUri = '/';

        if (isset($_SERVER['HTTP_X_REWRITE_URL'])) { // check this first so IIS will catch
            $requestUri = $_SERVER['HTTP_X_REWRITE_URL'];
        }
        elseif (
            // IIS7 with URL Rewrite: make sure we get the unencoded url (double slash problem)
            isset($_SERVER['IIS_WasUrlRewritten'])
            && $_SERVER['IIS_WasUrlRewritten'] == '1'
            && isset($_SERVER['UNENCODED_URL'])
            && $_SERVER['UNENCODED_URL'] != ''
        ) {
            $requestUri = $_SERVER['UNENCODED_URL'];
        }
        elseif (isset($_SERVER['REQUEST_URI'])) {
            $requestUri = $_SERVER['REQUEST_URI'];
            $parts = @parse_url($requestUri);

            if (isset($_SERVER['HTTP_HOST']) && strstr($requestUri, $_SERVER['HTTP_HOST'])) {
                if (false !== $parts) {
                    $requestUri = (empty($parts['path']) ? '' : $parts['path'])
                        . ((empty($parts['query'])) ? '' : '?' . $parts['query']);
                }
            }
            elseif (!empty($_SERVER['QUERY_STRING']) && empty($parts['query'])) {
                // fix query missing
                $requestUri .= '?' . $_SERVER['QUERY_STRING'];
            }
        }
        elseif (isset($_SERVER['ORIG_PATH_INFO'])) { // IIS 5.0, PHP as CGI
            $requestUri = $_SERVER['ORIG_PATH_INFO'];
            if (!empty($_SERVER['QUERY_STRING'])) {
                $requestUri .= '?' . $_SERVER['QUERY_STRING'];
            }
        }

        return $requestUri;
    }
947314
public function getUri()
    {
        if (!$this->uri)
            $this->uri = new Uri($this->httpMessage->getTarget());
        
        return $this->uri;
    }
118735
public function findAll()
    {
        $dimensions = [];
        foreach ($this->dimensionsConfiguration as $dimensionIdentifier => $dimensionConfiguration) {
            $dimensions[] = new ContentDimension($dimensionIdentifier, $dimensionConfiguration['default']);
        }
        return $dimensions;
    }
344903
protected function getRequestUri()
    {

        if (!$this->requestUri) {
            $this->requestUri = rtrim($this->endpointUri, '/') . '/' . $this->version;
        }

        return $this->requestUri;

    }
668472
public function getUri()
    {
        if (!isset($this->uri)) {
            $this->uri = $this->determineUri();
        }
        
        return $this->uri;
    }
804597
public function getFullUrl()
    {
        /** @var Uri $uri */
        $uri = $this->getUri();

        return rtrim($uri->getBaseUrl(), '/') . '/' . ltrim($uri->getPath(), '/');
    }
734036
public static function getUri() {
        if (self::$_uri === null) {
            $uri = explode('?', $_SERVER['REQUEST_URI'], 2)[0];
            self::$_uri = self::fixUri(substr($uri, strlen(BASE_URI)));
        }
        return self::$_uri;
    }
601448
public function getCurrentUri() : string
    {
        $basePath = $this->getBaseUrl();
        $uri = $this->currentUrl;

        $this->base = $basePath;
        $uri = substr($uri, strlen($basePath));

        // Don't take query params into account on the URL
        if (strstr($uri, '?')) {
            $uri = substr($uri, 0, strpos($uri, '?'));
        }

        // Remove trailing slash + enforce a slash at the start
        $uri = '/'.trim($uri, '/');

        return $uri;
    }
438337
public static function currentPage() {
		$uri = static::to(static::detectPath());
		foreach ($_GET as $k => $v) {
			$uri->param($k, $v);
		}

		return $uri;
	}
621705
protected function getCurrentUri()
  {
    // Get the current Request URI and remove rewrite base path from it (= allows one to run the router in a sub folder)
    $uri = substr($_SERVER['REQUEST_URI'], strlen($this->getBasePath()));
    // Don't take query params into account on the URL
    if (strstr($uri, '?')) {
      $uri = substr($uri, 0, strpos($uri, '?'));
    }
    // Remove trailing slash + enforce a slash at the start
    return '/' . trim($uri, '/');
  }