[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/libraries/src/Uri/ -> Uri.php (summary)

Joomla! Content Management System

Copyright: (C) 2005 Open Source Matters, Inc.
License: GNU General Public License version 2 or later; see LICENSE.txt
File Size: 292 lines (10 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Uri:: (8 methods):
  getInstance()
  base()
  root()
  current()
  reset()
  isInternal()
  buildQuery()
  parse()


Class: Uri  - X-Ref

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.

getInstance($uri = 'SERVER')   X-Ref
Returns the global Uri object, only creating it if it doesn't already exist.

param: string  $uri  The URI to parse.  [optional: if null uses script URI]
return: Uri  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.
param: string   $path      The path
return: string  The root URI string.

current()   X-Ref
Returns the URL for the request, minus the query.

return: string

reset()   X-Ref
Method to reset class static members for testing and other various issues.

return: void

isInternal($url)   X-Ref
Checks if the supplied URL is internal

param: string  $url  The URL to check.
return: boolean  True if Internal.

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.



Generated: Wed Sep 7 05:41:13 2022 Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer