| [ Index ] |
PHP Cross Reference of Joomla 1.5.26 DE |
[Source view] [Print] [Project Stats]
(no description)
| Copyright: | Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved. |
| License: | GNU/GPL, see LICENSE.php |
| Version: | $Id: uri.php 21079 2011-04-04 20:54:40Z dextercowley $ |
| File Size: | 799 lines (18 kb) |
| Included or required: | 0 times |
| Referenced: | 0 times |
| Includes or requires: | 0 files |
JURI:: (31 methods):
__construct()
getInstance()
base()
root()
current()
parse()
toString()
setVar()
getVar()
delVar()
setQuery()
getQuery()
buildQuery()
getScheme()
setScheme()
getUser()
setUser()
getPass()
setPass()
getHost()
setHost()
getPort()
setPort()
getPath()
setPath()
getFragment()
setFragment()
isSSL()
isInternal()
_cleanPath()
_parseURL()
| __construct($uri = null) X-Ref |
| Constructor. You can pass a URI string to the constructor to initialize a specific URI. param: string $uri The optional URI string |
| getInstance($uri = 'SERVER') X-Ref |
| Returns a reference to a global JURI object, only creating it if it doesn't already exist. This method must be invoked as: <pre> $uri =& JURI::getInstance([$uri]);</pre> param: string $uri The URI to parse. [optional: if null uses script URI] return: JURI The URI object. |
| base($pathonly = false) X-Ref |
| Returns the base URI for the request. param: boolean $pathonly If false, prepend the scheme, host and port information. Default is false. return: string The base URI string |
| root($pathonly = false, $path = null) X-Ref |
| Returns the root URI for the request. param: boolean $pathonly If false, prepend the scheme, host and port information. Default is false. return: string The root URI string |
| current() X-Ref |
| Returns the URL for the request, minus the query return: string |
| parse($uri) X-Ref |
| Parse a given URI and populate the class fields param: string $uri The URI string to parse return: boolean True on success |
| toString($parts = array('scheme', 'user', 'pass', 'host', 'port', 'path', 'query', 'fragment') X-Ref |
| Returns full uri string param: array $parts An array specifying the parts to render return: string The rendered URI string |
| setVar($name, $value) X-Ref |
| Adds a query variable and value, replacing the value if it already exists and returning the old value. param: string $name Name of the query variable to set param: string $value Value of the query variable return: string Previous value for the query variable |
| getVar($name = null, $default=null) X-Ref |
| Returns a query variable by name param: string $name Name of the query variable to get return: array Query variables |
| delVar($name) X-Ref |
| Removes an item from the query string variables if it exists param: string $name Name of variable to remove |
| setQuery($query) X-Ref |
| Sets the query to a supplied string in format: foo=bar&x=y param: mixed (array|string) $query The query string |
| getQuery($toArray = false) X-Ref |
| Returns flat query string return: string Query string |
| buildQuery($params, $akey = null) X-Ref |
| Build a query from a array (reverse of the PHP parse_str()) return: string The resulting query string |
| getScheme() X-Ref |
| Get URI scheme (protocol) ie. http, https, ftp, etc... return: string The URI scheme |
| setScheme($scheme) X-Ref |
| Set URI scheme (protocol) ie. http, https, ftp, etc... param: string $scheme The URI scheme |
| getUser() X-Ref |
| Get URI username returns the username, or null if no username was specified return: string The URI username |
| setUser($user) X-Ref |
| Set URI username param: string $user The URI username |
| getPass() X-Ref |
| Get URI password returns the password, or null if no password was specified return: string The URI password |
| setPass($pass) X-Ref |
| Set URI password param: string $pass The URI password |
| getHost() X-Ref |
| Get URI host returns the hostname/ip, or null if no hostname/ip was specified return: string The URI host |
| setHost($host) X-Ref |
| Set URI host param: string $host The URI host |
| getPort() X-Ref |
| Get URI port returns the port number, or null if no port was specified return: int The URI port number |
| setPort($port) X-Ref |
| Set URI port param: int $port The URI port number |
| getPath() X-Ref |
| Gets the URI path string return: string The URI path string |
| setPath($path) X-Ref |
| Set the URI path string param: string $path The URI path string |
| getFragment() X-Ref |
| Get the URI archor string everything after the "#" return: string The URI anchor string |
| setFragment($anchor) X-Ref |
| Set the URI anchor string everything after the "#" param: string $anchor The URI anchor string |
| isSSL() X-Ref |
| Checks whether the current URI is using HTTPS return: boolean True if using SSL via HTTPS |
| isInternal($url) X-Ref |
| Checks if the supplied URL is internal param: string $url The URL to check return: boolean True if Internal |
| _cleanPath($path) X-Ref |
| 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 param: string $uri The URI path to clean return: string Cleaned and resolved URI path |
| _parseURL($uri) X-Ref |
| Backwards compatibility function for parse_url function This function solves different bugs in PHP versions lower then 4.4, will be deprecated in future versions. return: array Associative array containing the URL parts |
| Generated: Wed Mar 28 15:54:07 2012 | Cross-referenced by PHPXref 0.7.1 |