Joomla CMS  3.10.11 (avec JPlatform 13.1 inclus)
Documentation des API du CMS Joomla en version 3.10.11 et du framework Joomla Platform intégré
Tout Structures de données Espaces de nommage Fichiers Fonctions Variables Pages
Référence de la classe Uri
+ Graphe d'héritage de Uri:

Fonctions membres publiques

 setPath ($path)
 
 parse ($uri)
 
- Fonctions membres publiques hérités de Uri
 setVar ($name, $value)
 
 delVar ($name)
 
 setQuery ($query)
 
 setScheme ($scheme)
 
 setUser ($user)
 
 setPass ($pass)
 
 setHost ($host)
 
 setPort ($port)
 
 setPath ($path)
 
 setFragment ($anchor)
 
- Fonctions membres publiques hérités de AbstractUri
 __construct ($uri=null)
 
 __toString ()
 
 toString (array $parts=array('scheme', 'user', 'pass', 'host', 'port', 'path', 'query', 'fragment'))
 
 render ($parts=self::ALL)
 
 hasVar ($name)
 
 getVar ($name, $default=null)
 
 getQuery ($toArray=false)
 
 getScheme ()
 
 getUser ()
 
 getPass ()
 
 getHost ()
 
 getPort ()
 
 getPath ()
 
 getFragment ()
 
 isSsl ()
 

Fonctions membres publiques statiques

static getInstance ($uri='SERVER')
 
static base ($pathonly=false)
 
static root ($pathonly=false, $path=null)
 
static current ()
 
static reset ()
 
static isInternal ($url)
 
static buildQuery (array $params)
 

Fonctions membres protégées

 _cleanPath ($path)
 
- Fonctions membres protégées hérités de AbstractUri
 parse ($uri)
 
 cleanPath ($path)
 

Attributs protégés statiques

static $instances = array()
 
static $base = array()
 
static $root = array()
 
static $current
 

Membres hérités additionnels

- Champs de données hérités de UriInterface
const SCHEME = 1
 
const USER = 2
 
const PASS = 4
 
const HOST = 8
 
const PORT = 16
 
const PATH = 32
 
const QUERY = 64
 
const FRAGMENT = 128
 
const ALL = 255
 
- Fonctions membres protégées statiques hérités de AbstractUri
static buildQuery (array $params)
 
- Attributs protégés hérités de AbstractUri
 $uri
 
 $scheme
 
 $host
 
 $port
 
 $user
 
 $pass
 
 $path
 
 $query
 
 $fragment
 
 $vars = array()
 

Description détaillée

JUri 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.

Depuis
1.7.0

Documentation des fonctions membres

◆ _cleanPath()

_cleanPath (   $path)
protected

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ètres
string$pathThe URI path to clean.
Renvoie
string Cleaned and resolved URI path.
Depuis
1.7.0
Obsolète:
4.0 Use Joomla\Uri\Uri::cleanPath()instead

Références AbstractUri\$path.

Référencé par Uri\setPath().

◆ base()

static base (   $pathonly = false)
static

Returns the base URI for the request.

Paramètres
boolean$pathonlyIf false, prepend the scheme, host and port information. Default is false.
Renvoie
string The base URI string
Depuis
1.7.0

Références $base, $config, AbstractUri\$uri, JPATH_ADMINISTRATOR, et JPATH_BASE.

Référencé par OpensearchDocument\__construct(), HtmlDocument\_fetchTemplate(), HtmlDocument\_loadTemplate(), DocumentRenderer\_relToAbs(), HTMLHelper\includeRelativeFiles(), et ErrorDocument\render().

◆ buildQuery()

static buildQuery ( array  $params)
static

Build a query from an array (reverse of the PHP parse_str()).

Paramètres
array$paramsThe array of key => value pairs to return as a query string.
Renvoie
string The resulting query string.
Voir également
parse_str()
Depuis
1.7.0
Note
The parent method is protected, this exposes it as public for B/C

Références $params.

◆ current()

static current ( )
static

Returns the URL for the request, minus the query.

Renvoie
string
Depuis
1.7.0

Références $current, et AbstractUri\$uri.

◆ getInstance()

static getInstance (   $uri = 'SERVER')
static

Returns the global JUri object, only creating it if it doesn't already exist.

Paramètres
string$uriThe URI to parse. [optional: if null uses script URI]
Renvoie
Uri The URI object.
Depuis
1.7.0

Références AbstractUri\$uri, et elseif.

Référencé par OpensearchDocument\__construct(), Factory\getUri(), Route\link(), ToolbarHelper\preferences(), RssRenderer\render(), et AtomRenderer\render().

◆ isInternal()

static isInternal (   $url)
static

Checks if the supplied URL is internal

Paramètres
string$urlThe URL to check.
Renvoie
boolean True if Internal.
Depuis
1.7.0

Références Uri\$base, AbstractUri\$host, AbstractUri\$uri, et $url.

◆ parse()

parse (   $uri)

Parse a given URI and populate the class fields.

Paramètres
string$uriThe URI string to parse.
Renvoie
boolean True on success.
Depuis
1.7.0
Note
The parent method is protected, this exposes it as public for B/C

Références AbstractUri\$uri.

◆ reset()

static reset ( )
static

Method to reset class static members for testing and other various issues.

Renvoie
void
Depuis
1.7.0

Références $base, $current, et $root.

◆ root()

static root (   $pathonly = false,
  $path = null 
)
static

Returns the root URI for the request.

Paramètres
boolean$pathonlyIf false, prepend the scheme, host and port information. Default is false.
string$pathThe path
Renvoie
string The root URI string.
Depuis
1.7.0

Références AbstractUri\$path, $root, et AbstractUri\$uri.

Référencé par AdministratorRouter\build(), HTMLHelper\includeRelativeFiles(), et PlgUserJoomla\onUserAfterSave().

◆ setPath()

setPath (   $path)

Set the URI path string. Note we keep this method here so it uses the old _cleanPath function

Paramètres
string$pathThe URI path string.
Renvoie
void
Depuis
1.7.0
Obsolète:
4.0 Use Joomla\Uri\Uri::setPath()
Note
Present to proxy calls to the deprecated JUri::_cleanPath() method.

Références AbstractUri\$path, et Uri\_cleanPath().

Documentation des champs

◆ $base

$base = array()
staticprotected

Référencé par Uri\isInternal().

◆ $current

$current
staticprotected

◆ $instances

$instances = array()
staticprotected

◆ $root

$root = array()
staticprotected

La documentation de cette classe a été générée à partir du fichier suivant :