Phpfox_Url

Description

URL Class is used to build the URL structure of the site.

  • author: Raymond Benc
  • version: $Id: url.class.php 1687 2010-07-22 03:13:27Z Raymond_Benc $
  • copyright: [PHPFOX_COPYRIGHT]

Located in /include/library/phpfox/url/url.class.php (line 17)


	
			
Variable Summary
 static bool $_isMobile
 array $aRewrite
 unknown_type $_aParams
 bool $_bIsUsed
Method Summary
 Phpfox_Url __construct ()
 void clearParam ([ $mName = ''], string $sName)
 string decode (string $sStr)
 string doRewrite (string $sUrl)
 string encode (string $sStr)
 void forward (string $sUrl, [string $sMsg = ''])
 string getDomain ()
 string getFullUrl ([bool $bNoPath = false])
 array getParams ()
 array getRewrite ()
 string getUrl ()
 bool isMobile ()
 array isRegistration (int $iReq)
 bool isUrl (mixed $mName)
 array makeReverseUrl (string $sUrl)
 string makeUrl (string $sUrl, [array $aParams = array()], [bool $bFullPath = false])
 array parseUrl (string $sUrl)
 void send (string $sUrl, [array $aParams = array()], [string $sMsg = null])
 void setParam (mixed $mName, [string $sValue = ''])
 bool _isUrl ( &$sUrl, string $sName, string $sUrl)
 string _makeUrl ( &$aParts,  &$aParams, array $aParts, array $aParams)
 array _parseUrl (string $sUrl)
 void _send (string $sUrl)
 void _setParams ()
Variables
static bool $_isMobile = false (line 47)

Check to see if we are using a mobile device.

  • access: private
array $aRewrite = array() (line 24)

List of rewrite rules.

  • access: public
unknown_type $_aParams = array() (line 31)

List of all the requests.

  • access: private
bool $_bIsUsed = false (line 39)

Not being used.

  • deprecated: 2.0.5
  • access: private
Methods
Constructor __construct (line 53)

Class constructor is used to build the current URL and all the custom rewrite rules.

  • access: public
Phpfox_Url __construct ()
clearParam (line 254)

Clears all params or a single parameter

  • access: public
void clearParam ([ $mName = ''], string $sName)
  • string $sName: the name of the parameter to clear.
  • $mName
decode (line 114)

Decodes a URL string encoded with the method encode().

  • return: Decoded URL string.
  • see: self::encode()
  • access: public
string decode (string $sStr)
  • string $sStr: URL string to decode.
doRewrite (line 142)

Perform a URL rewrite if it exists.

  • return: If rewrite exists it will return the rewrite value.
  • access: public
string doRewrite (string $sUrl)
  • string $sUrl: URL to write.
encode (line 95)

Encodes a URL string.

  • return: URL encoded string.
  • access: public
string encode (string $sStr)
  • string $sStr: URL string.
forward (line 158)

Send the user to a new page. Works similar to PHP "header('Location: ...');".

  • access: public
void forward (string $sUrl, [string $sMsg = ''])
  • string $sUrl: URL.
  • string $sMsg: Optional message you can pass which will be displayed on the arrival page.
getDomain (line 322)

Get the domain mame of the site.

  • access: public
string getDomain ()
getFullUrl (line 239)

Get the full URL of the current page.

  • return: URL.
  • access: public
string getFullUrl ([bool $bNoPath = false])
  • bool $bNoPath: TRUE to include the URL path, FALSE if not.
getParams (line 312)

Get all the requests.

  • access: public
array getParams ()
getRewrite (line 131)

Get all the custom rewrite rules.

  • access: public
array getRewrite ()
getUrl (line 217)

Get the URL of the current page.

  • return: URL.
  • access: public
string getUrl ()
isMobile (line 84)

Check to see if we are using a mobile device.

  • return: TRUE for mobile device, FALSE if not.
  • access: public
bool isMobile ()
isRegistration (line 561)

Check if the controller we are on has a registration step.

  • return: 1st value for the array is BOOL to see if this is a registration step. The 2nd value is the next URL.
  • access: public
array isRegistration (int $iReq)
  • int $iReq: Request step.
isUrl (line 193)

Checks to see if a URL exists.

  • return: TRUE if URL exists, FALSE if not.
  • access: public
bool isUrl (mixed $mName)
  • mixed $mName: STRING name of URL or ARRAY of URLs to check.
makeReverseUrl (line 338)

Reverse rewrite URLs.

  • return: ARRAY of requests within the STRING URL.
  • access: public
array makeReverseUrl (string $sUrl)
  • string $sUrl: URL.
makeUrl (line 374)

Make an internal link.

  • return: Full URL.
  • access: public
string makeUrl (string $sUrl, [array $aParams = array()], [bool $bFullPath = false])
  • string $sUrl: Internal link.
  • array $aParams: ARRAY of params to include in the link.
  • bool $bFullPath: Not using this argument any longer.
parseUrl (line 532)

Parse a URL string.

  • return: ARRAY converted from the URL STRING.
  • access: public
array parseUrl (string $sUrl)
  • string $sUrl: URL.
send (line 176)

Send a user to a new page using the URL method we use.

  • access: public
void send (string $sUrl, [array $aParams = array()], [string $sMsg = null])
  • string $sUrl: Internal URL.
  • array $aParams: ARRAY of params to include in the URL.
  • string $sMsg: Optional message you can pass which will be displayed on the arrival page.
setParam (line 285)

Set a request.

  • access: public
void setParam (mixed $mName, [string $sValue = ''])
  • mixed $mName: STRING request name or ARRAY of requests using keys and values.
  • string $sValue: Request value only if the 1st argument is a STRING.
_isUrl (line 828)

Checks to see if a URL exists or not within the rewrite rules.

  • return: TRUE if URL exists, FALSE if not.
  • access: private
bool _isUrl ( &$sUrl, string $sName, string $sUrl)
  • string $sUrl: URL name.
  • string $sName: ID name of the URL.
  • &$sUrl
_makeUrl (line 663)

Build a URL based on the apache rewrite rules.

  • return: Converted URL.
  • access: private
string _makeUrl ( &$aParts,  &$aParams, array $aParts, array $aParams)
  • array $aParts: ARRAY of all the URL parts.
  • array $aParams: ARRAY of all the requests.
  • &$aParts
  • &$aParams
_parseUrl (line 599)

Parse a URL string and convert it into an ARRAY.

  • return: ARRAY of requests.
  • access: private
array _parseUrl (string $sUrl)
  • string $sUrl: URL string.
_send (line 647)

Send the user to a new location.

  • access: private
void _send (string $sUrl)
  • string $sUrl: Full URL.
_setParams (line 723)

Prepare the main requests.

  • access: private
void _setParams ()

Documentation generated on Tue, 28 Sep 2010 10:36:44 +0200 by phpDocumentor 1.4.0a2