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 AbstractUri
+ Graphe d'héritage de AbstractUri:

Fonctions membres publiques

 __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 protégées

 parse ($uri)
 
 cleanPath ($path)
 

Fonctions membres protégées statiques

static buildQuery (array $params)
 

Attributs protégés

 $uri
 
 $scheme
 
 $host
 
 $port
 
 $user
 
 $pass
 
 $path
 
 $query
 
 $fragment
 
 $vars = array()
 

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
 

Description détaillée

Uri Class

Abstract base for out uri classes.

This class should be considered an implementation detail. Typehint against UriInterface.

Depuis
1.0

Documentation des constructeurs et destructeur

◆ __construct()

__construct (   $uri = null)

Constructor. You can pass a URI string to the constructor to initialise a specific URI.

Paramètres
string$uriThe optional URI string
Depuis
1.0

Références AbstractUri\$uri, null, et AbstractUri\parse().

Documentation des fonctions membres

◆ __toString()

__toString ( )

Magic method to get the string representation of the URI object.

Renvoie
string
Depuis
1.0

Implémente UriInterface.

Références AbstractUri\toString().

◆ buildQuery()

static buildQuery ( array  $params)
staticprotected

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

Références $params.

◆ 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.0

Références $i, $n, AbstractUri\$path, et elseif.

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

◆ getFragment()

getFragment ( )

Get the URI anchor string Everything after the "#".

Renvoie
string The URI anchor string.
Depuis
1.0

Implémente UriInterface.

Références AbstractUri\$fragment.

◆ getHost()

getHost ( )

Get URI host Returns the hostname/ip or null if no hostname/ip was specified.

Renvoie
string The URI host.
Depuis
1.0

Implémente UriInterface.

Références AbstractUri\$host.

◆ getPass()

getPass ( )

Get URI password Returns the password, or null if no password was specified.

Renvoie
string The URI password.
Depuis
1.0

Implémente UriInterface.

Références AbstractUri\$pass.

◆ getPath()

getPath ( )

Gets the URI path string.

Renvoie
string The URI path string.
Depuis
1.0

Implémente UriInterface.

Références AbstractUri\$path.

◆ getPort()

getPort ( )

Get URI port Returns the port number, or null if no port was specified.

Renvoie
integer The URI port number.
Depuis
1.0

Implémente UriInterface.

Références null.

◆ getQuery()

getQuery (   $toArray = false)

Returns flat query string.

Paramètres
boolean$toArrayTrue to return the query as a key => value pair array.
Renvoie
string|array Query string or Array of parts in query string depending on the function param
Depuis
1.0

Implémente UriInterface.

Références AbstractUri\$query, AbstractUri\$vars, et null.

Référencé par AbstractUri\render().

◆ getScheme()

getScheme ( )

Get URI scheme (protocol) ie. http, https, ftp, etc...

Renvoie
string The URI scheme.
Depuis
1.0

Implémente UriInterface.

Références AbstractUri\$scheme.

Référencé par AbstractUri\isSsl().

◆ getUser()

getUser ( )

Get URI username Returns the username, or null if no username was specified.

Renvoie
string The URI username.
Depuis
1.0

Implémente UriInterface.

Références AbstractUri\$user.

◆ getVar()

getVar (   $name,
  $default = null 
)

Returns a query variable by name.

Paramètres
string$nameName of the query variable to get.
string$defaultDefault value to return if the variable is not set.
Renvoie
mixed Value of the specified query variable.
Depuis
1.0

Implémente UriInterface.

Références $default, et $name.

◆ hasVar()

hasVar (   $name)

Checks if variable exists.

Paramètres
string$nameName of the query variable to check.
Renvoie
boolean True if the variable exists.
Depuis
1.0

Implémente UriInterface.

Références $name.

◆ isSsl()

isSsl ( )

Checks whether the current URI is using HTTPS.

Renvoie
boolean True if using SSL via HTTPS.
Depuis
1.0

Implémente UriInterface.

Références AbstractUri\getScheme(), et true.

◆ parse()

parse (   $uri)
protected

Parse a given URI and populate the class fields.

Paramètres
string$uriThe URI string to parse.
Renvoie
boolean True on success.
Depuis
1.0

Références $parts, AbstractUri\$uri, null, et UriHelper\parse_url().

Référencé par AbstractUri\__construct().

◆ render()

render (   $parts = self::ALL)

Returns full uri string.

Paramètres
integer$partsA bitmask specifying the parts to render.
Renvoie
string The rendered URI string.
Depuis
1.2.0

Références $parts, AbstractUri\$query, AbstractUri\$uri, et AbstractUri\getQuery().

Référencé par AbstractUri\toString().

◆ toString()

toString ( array  $parts = array('scheme', 'user', 'pass', 'host', 'port', 'path', 'query', 'fragment'))

Returns full uri string.

Paramètres
array$partsAn array of strings specifying the parts to render.
Renvoie
string The rendered URI string.
Depuis
1.0

Implémente UriInterface.

Références $parts, et AbstractUri\render().

Référencé par AbstractUri\__toString().

Documentation des champs

◆ $fragment

$fragment
protected

Référencé par AbstractUri\getFragment().

◆ $host

$host
protected

◆ $pass

$pass
protected

Référencé par AbstractUri\getPass(), et Uri\setPass().

◆ $path

◆ $port

$port
protected

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

◆ $query

$query
protected

◆ $scheme

$scheme
protected

◆ $uri

◆ $user

$user
protected

Référencé par AbstractUri\getUser(), et Uri\setUser().

◆ $vars

$vars = array()
protected

Référencé par AbstractUri\getQuery().


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