[ Index ] |
PHP Cross Reference of Joomla 4.2.2 documentation |
[Source view] [Print] [Project Stats]
Part of the Joomla Framework Uri Package
Copyright: | Copyright (C) 2005 - 2022 Open Source Matters, Inc. All rights reserved. |
License: | GNU General Public License version 2 or later; see LICENSE |
File Size: | 440 lines (8 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
__construct($uri = null) X-Ref |
Constructor. You can pass a URI string to the constructor to initialise a specific URI. param: string $uri The optional URI string |
__toString() X-Ref |
Magic method to get the string representation of the UriInterface object. return: string |
toString($parts = ['scheme', 'user', 'pass', 'host', 'port', 'path', 'query', 'fragment']) X-Ref |
Returns full URI string. param: array $parts An array of strings specifying the parts to render. return: string The rendered URI string. |
render($parts = self::ALL) X-Ref |
Returns full uri string. param: integer $parts A bitmask specifying the parts to render. return: string The rendered URI string. |
hasVar($name) X-Ref |
Checks if variable exists. param: string $name Name of the query variable to check. return: boolean True if the variable exists. |
getVar($name, $default = null) X-Ref |
Returns a query variable by name. param: string $name Name of the query variable to get. param: string $default Default value to return if the variable is not set. return: mixed Requested query variable if present otherwise the default value. |
getQuery($toArray = false) X-Ref |
Returns flat query string. param: boolean $toArray True to return the query as a key => value pair array. return: string|array Query string or Array of parts in query string depending on the function param |
getScheme() X-Ref |
Get the URI scheme (protocol) return: string The URI scheme. |
getUser() X-Ref |
Get the URI username return: string The username, or null if no username was specified. |
getPass() X-Ref |
Get the URI password return: string The password, or null if no password was specified. |
getHost() X-Ref |
Get the URI host return: string The hostname/IP or null if no hostname/IP was specified. |
getPort() X-Ref |
Get the URI port return: integer The port number, or null if no port was specified. |
getPath() X-Ref |
Gets the URI path string return: string The URI path string. |
getFragment() X-Ref |
Get the URI anchor string return: string The URI anchor string. |
isSsl() X-Ref |
Checks whether the current URI is using HTTPS. return: boolean True if using SSL via HTTPS. |
buildQuery(array $params) X-Ref |
Build a query from an array (reverse of the PHP parse_str()). param: array $params The array of key => value pairs to return as a query string. return: string The resulting query 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. |
cleanPath($path) X-Ref |
Resolves //, ../ and ./ from a path and returns the result. For example: /foo/bar/../boo.php => /foo/boo.php /foo/bar/../../boo.php => /boo.php /foo/bar/.././/boo.php => /foo/boo.php param: string $path The URI path to clean. return: string Cleaned and resolved URI path. |
Generated: Wed Sep 7 05:41:13 2022 | Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer |