Back to Joomla project (class list)

Class Uri - list of methods

Uri Class
This class serves two purposes. First it parses a URI and provides a common interface for the Joomla Platform to access and manipulate a URI. Second it obtains the URI of the current executing script from the server regardless of server.
Package: Joomla\CMS\Uri
Copyright: (C) 2005 Open Source Matters, Inc.
License: GNU General Public License version 2 or later; see LICENSE.txt
Located at: Joomla/Uri/Uri.php
Project: Joomla

Method Summary

public static \Joomla\CMS\Uri\Uri
(mixed $uri = 'SERVER')

Returns the global Uri object, only creating it if it doesn't already exist.
Parameters
  • string $uri The URI to parse. [optional: if null uses script URI]
Returns
  • \Joomla\CMS\Uri\Uri The URI object.
Since
  • 1.7.0
Show source code of this method: getInstance Source Code

public static string
(mixed $pathonly = false)

Returns the base URI for the request.
Parameters
  • bool $pathonly If false, prepend the scheme, host and port information. Default is false.
Returns
  • string The base URI string
Since
  • 1.7.0
Show source code of this method: base Source Code

public static string
(mixed $pathonly = false, mixed $path = null)

Returns the root URI for the request.
Parameters
  • bool $pathonly If false, prepend the scheme, host and port information. Default is false.
  • string $path The path
Returns
  • string The root URI string.
Since
  • 1.7.0
Show source code of this method: root Source Code

public static string
()

Returns the URL for the request, minus the query.
Returns
  • string
Since
  • 1.7.0
Show source code of this method: current Source Code

public static void
()

Method to reset class static members for testing and other various issues.
Returns
  • void
Since
  • 1.7.0
Show source code of this method: reset Source Code

public static bool
(mixed $url)

Checks if the supplied URL is internal
Parameters
  • string $url The URL to check.
Returns
  • bool True if Internal.
Since
  • 1.7.0
Show source code of this method: isInternal Source Code

public static string
(array $params)

Build a query from an array (reverse of the PHP parse_str()).
Parameters
  • array $params The array of key => value pairs to return as a query string.
Returns
  • string The resulting query string.
Since
  • 1.7.0
-
  • \Joomla\CMS\Uri\parse_str()
  • The parent method is protected, this exposes it as public for B/C
Show source code of this method: buildQuery Source Code

public bool
(mixed $uri)

Parse a given URI and populate the class fields.
Parameters
  • string $uri The URI string to parse.
Returns
  • bool True on success.
Since
  • 1.7.0
-
  • The parent method is protected, this exposes it as public for B/C
Show source code of this method: parse Source Code

Properties Summary

protected static \Joomla\CMS\Uri\Uri[]
$instances
Since
  • 1.7.0
protected static array
$base
Since
  • 1.7.0
protected static array
$root
Since
  • 1.7.0
protected static string
$current
Since
  • 1.7.0

Tags Summary

Since
1.7.0