Class ModRewriteController

Description

Mod Rewrite controller class. Extracts url parts and sets some necessary globals like:

  • $idart
  • $idcat
  • $client
  • $changeclient
  • $lang
  • $changelang
TODO: Adapt to PHP 5 coding standards...

Located in /contenido/plugins/mod_rewrite/classes/class.modrewritecontroller.php (line 33)


	
			
Variable Summary
 array $_aCfg
 array $_aCfgMR
 array $_aParts
 bool $_bError
 string $_sArtName
 string $_sPath
 string $_sRequestUri
Method Summary
 ModRewriteController ModRewriteController (string $requestUri)
 bool errorOccured ()
 void execute ()
 int getChangeLang ()
 int getClient ()
 int getIdArt ()
 int getIdCat ()
 int getLang ()
 string getPath ()
 string getResolvedUrl ()
 void parseUrl ( $url)
 void _extractRequestUri ([ $secondCall = false])
 void _overrideConfig ()
 void _postValidation ()
 void _setClientId ()
 void _setIdart ()
 void _setLanguageId ()
Variables
array $_aCfg (line 40)

Contenido configuration array (see $GLOBALS['cfg'])

array $_aCfgMR (line 47)

Mod Rewrite configuration array (see $GLOBALS['cfg']['mod_rewrite'])

array $_aParts (line 54)

Extracted request uri path parts by path separator '/'

bool $_bError = false (line 96)

Flag about occured errors

bool $_bIsRouting = false (line 103)

Flag about matched routing definition

int $_iClientMR (line 89)

Client id used by this class

string $_sArtName (line 61)

Extracted article name from request uri

string $_sPath (line 68)

Remaining path for path resolver (see $GLOBALS['path'])

string $_sRequestUri (line 75)

Request URI

string $_sResolvedUrl (line 82)

Resolved URL

Methods
Constructor ModRewriteController (line 110)

Constructor, sets several properties.

ModRewriteController ModRewriteController (string $requestUri)
  • string $requestUri: Request URI
errorOccured (line 205)

Getter for occured error state

  • return: Flag for occured error
bool errorOccured ()
execute (line 216)

Main function to call for mod rewrite related preprocessing jobs.

Executes some private functions to extract request URI and to set needed membervariables (client, language, article id, category id, etc.)

void execute ()
getChangeClient (line 135)

Getter for overwritten change client id (see $GLOBALS['changeclient'])

  • return: Change client id
int getChangeClient ()
getChangeLang (line 175)

Getter for change language id (see $GLOBALS['change_lang'])

  • return: Change language id
int getChangeLang ()
getClient (line 125)

Getter for overwritten client id (see $GLOBALS['client'])

  • return: Client id
int getClient ()
getIdArt (line 145)

Getter for article id (see $GLOBALS['idart'])

  • return: Article id
int getIdArt ()
getIdCat (line 155)

Getter for category id (see $GLOBALS['idcat'])

  • return: Category id
int getIdCat ()
getLang (line 165)

Getter for language id (see $GLOBALS['lang'])

  • return: Language id
int getLang ()
getPath (line 185)

Getter for path (see $GLOBALS['path'])

  • return: Path, used by path resolver
string getPath ()
getResolvedUrl (line 195)

Getter for resolved url

  • return: Resolved url
string getResolvedUrl ()
parseUrl (line 590)
void parseUrl ( $url)
  • $url
_extractRequestUri (line 254)

Extracts request URI and sets member variables $this->_sArtName and $this->_aParts

  • access: private
void _extractRequestUri ([ $secondCall = false])
  • $secondCall
_hasPartArrayItems (line 614)

Returns state of parts property

  • return: True if $this->_aParts propery is an array and contains items
  • access: private
bool _hasPartArrayItems ()
_overrideConfig (line 346)

Overrides local mod rewrite cfg settings with client settings from database

  • access: private
void _overrideConfig ()
_postValidation (line 547)

Does post validation of the extracted data.

One main goal of this function is to prevent duplicated content, which could happen, if the configuration 'startfromroot' is activated.

void _postValidation ()
_preprocessVariables (line 374)

Preprocesses article name and parts list, sets article name and parts list if settings for usage of categories as a html file is active and valid.

  • deprecated:
  • access: private
void _preprocessVariables ()
_setClientId (line 394)

Sets client id

  • access: private
void _setClientId ()
_setIdart (line 497)

Sets article id

  • access: private
void _setIdart ()
_setLanguageId (line 424)

Sets language id

  • access: private
void _setLanguageId ()
_setPathresolverSetting (line 450)

Sets path resolver and category id

  • access: private
void _setPathresolverSetting ()

Documentation generated on Tue, 12 Aug 2008 00:06:20 +0200 by phpDocumentor 1.4.0