Class jUrl

Description

Object that contains url data, and which provides static method helpers

  • author: Gerald Croes (for the original code from Copix)
  • author: Laurent Jouanneau (for the original code from Copix and enhancement for jelix)
  • copyright: 2005 CopixTeam, 2005-2006 Laurent Jouanneau

Located in /core/jUrl.class.php (line 163)

jUrlBase
   |
   --jUrl
Class Constant Summary
 JURL = 2
 STRING = 0
 XMLSTRING = 1
Variable Summary
string $pathInfo
string $scriptName
Method Summary
static string appendToUrlString (string $url, [array $params = array ()], [boolean $forxml = false])
static string escape (string $str, [boolean $highlevel = false])
static mixed get (string $actSel, [array $params = array ()], [integer $what = 0])
static string getCurrentUrl ([boolean $forxml = false])
static jIUrlEngine getEngine ([ $reset = false])
static jUrlAction parse (string $scriptNamePath, string $pathinfo, array $params)
static string unescape (string $str)
jUrl __construct ([string $scriptname = ''], [array $params = array ()], [string $pathInfo = ''])
string getPath ()
string getQuery ([boolean $forxml = false])
string toString ([boolean $forxml = false])
Variables
string $pathInfo = '' (line 185)

path info part of the url

  • access: public
string $scriptName (line 179)

script name including its path

  • access: public

Inherited Variables

Inherited from jUrlBase

jUrlBase::$params
Methods
static appendToUrlString (line 269)

Adds parameters to the given url

  • return: the url
static string appendToUrlString (string $url, [array $params = array ()], [boolean $forxml = false])
  • string $url: an URL
  • array $params: some parameters to append to the url
  • boolean $forxml: if true, escape some characters to include the url into an html/xml document
static escape (line 323)

escape and simplier a string to be a part of an url path remove or replace not allowed characters etc..

  • return: escaped string
static string escape (string $str, [boolean $highlevel = false])
  • string $str: the string to escape
  • boolean $highlevel: false : just to a urlencode. true, replace some characters
static get (line 289)

Gets the url corresponding to an action, in the given format

  • return: a value, depending of the $what parameter
static mixed get (string $actSel, [array $params = array ()], integer $what)
  • string $actSel: action selector. You can use # instead of the module or the action name, to specify the current url.
  • array $params: associative array with the parameters
  • integer $what: the format you want : one of the jUrl const, STRING XMLSTRING JURL JURLACTION
static getCurrentUrl (line 247)

get current Url

  • return: the url
static string getCurrentUrl ([boolean $forxml = false])
  • boolean $forxml: if true, escape some characters to include the url into an html/xml document
static getEngine (line 358)

return the current url engine

static jIUrlEngine getEngine ([ $reset = false])
  • $reset
static parse (line 312)

Parse a url

static jUrlAction parse (string $scriptNamePath, string $pathinfo, array $params)
  • string $scriptNamePath: /path/index.php
  • string $pathinfo: the path info of the url.
  • array $params: url parameter ($_REQUEST)
static unescape (line 349)

perform the opposit of escape

static string unescape (string $str)
  • string $str: the string to escape
Constructor __construct (line 193)

constructor

jUrl __construct ([string $scriptname = ''], [array $params = array ()], [string $pathInfo = ''])
  • string $scriptname: script name
  • array $params: parameters
  • string $pathInfo: path info contents
getPath (line 214)

get the path part of the url (scriptName + pathinfo)

  • since: 1.0.4
  • access: public
string getPath ()
getQuery (line 229)

get the query part of the url

  • since: 1.0.4
  • access: public
string getQuery ([boolean $forxml = false])
  • boolean $forxml: true: some characters will be escaped
toString (line 205)

converts the url to a string

  • access: public
string toString ([boolean $forxml = false])
  • boolean $forxml: true: some characters will be escaped

Redefinition of:
jUrlBase::toString()
get the url string corresponding to the url/action

Inherited Methods

Inherited From jUrlBase

jUrlBase::clearParam()
jUrlBase::delParam()
jUrlBase::getParam()
jUrlBase::setParam()
jUrlBase::toString()
jUrlBase::__toString()
Class Constants
JURL = 2 (line 171)

constant for get() method

JURLACTION = 3 (line 172)

constant for get() method

STRING = 0 (line 169)

constant for get() method

XMLSTRING = 1 (line 170)

constant for get() method

Documentation generated on Wed, 07 Sep 2011 13:48:12 +0200 by phpDocumentor 1.4.3