JURIJURI Class
This class serves two purposes. First to parse a URI and provide a common interface for the Joomla Framework to access and manipulate a URI. Second to attain the URI of the current executing script from the server regardless of server.
The concept and implementation of this class is drawn heavily from the binary cloud environment package. <http://www.binarycloud.com/>
Located in /application/environment/uri.php (line 31)
JObject | --JURI
string
toString
([array $parts = array('scheme', 'user', 'pass', 'host', 'port', 'path', 'query', 'fragment')])
string
$_anchor
= null (line 94)
Anchor
string
$_host
= null (line 66)
Host
string
$_pass
= null (line 59)
Password
string
$_path
= null (line 80)
Path
integer
$_port
= null (line 73)
Port
string
$_scheme
= null (line 45)
Protocol
string
$_uri
= null (line 38)
Original URI
string
$_user
= null (line 52)
Username
array
$_vars
= array () (line 87)
Query variable hash
Constructor.
You can pass a URI string to the constructor to initialize a specific URI.
Removes an item from the query string variables if it exists
Get URI host returns the hostname/ip, or null if no hostname/ip was specified
Returns a reference to a global JURI object, only creating it if it doesn't already exist.
This method must be invoked as:
$uri =& JURI::getInstance([$uri]);
Get URI password returns the password, or null if no password was specified
Get URI port returns the port number, or null if no port was specified
Returns flat query string from (array) $_vars hash
Get URI username returns the username, or null if no username was specified
Parse a given URI and populate the class fields
Set the URI anchor string everything after the "#"
Set URI password
Set the URI path string
Sets the query to a supplied string in format: foo=bar&x=y
Set URI scheme (protocol) ie. http, https, ftp, etc...
Set URI username
Adds a query variable and value, replacing the value if it already exists and returning the old value.
Returns full uri string
Resolves //, ../ and ./ from a path and returns the result. Eg:
/foo/bar/../boo.php => /foo/boo.php /foo/bar/../../boo.php => /boo.php /foo/bar/.././/boo.php => /foo/boo.php
Parses raw query and returns an array of key/value pairs representing the query string variables.
Inherited From JObject
JObject::__construct()
JObject::JObject()
JObject::get()
JObject::set()
JObject::toString()
JObject::__destruct()
Documentation generated on Sat, 4 Feb 2006 14:27:09 +0100 by phpDocumentor 1.3.0RC4