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 /classes/class.modrewritecontroller.php (line 33)


	
			
Variable Summary
 array $_aCfg
 array $_aCfgMR
 array $_aParts
 bool $_bError
 string $_sArtName
 string $_sPath
Method Summary
 ModRewriteController ModRewriteController ()
 bool errorOccured ()
 void execute ()
 int getChangeLang ()
 int getClient ()
 int getIdArt ()
 int getIdCat ()
 int getLang ()
 string getPath ()
 void _extractRequestUri ([ $secondCall = false])
 void _overrideConfig ()
 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 82)

Flag about occured errors

int $_iClientMR (line 75)

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'])

Methods
Constructor ModRewriteController (line 87)

Constructor, sets several properties.

ModRewriteController ModRewriteController ()
errorOccured (line 169)

Getter for occured error state

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

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 109)

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

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

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

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

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

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

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

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

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

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

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

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

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

  • return: Path, used by path resolver
string getPath ()
_extractRequestUri (line 216)

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

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

Returns state of parts property

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

Overrides local mod rewrite cfg settings with client settings from database

  • access: private
void _overrideConfig ()
_preprocessVariables (line 322)

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.

  • access: private
void _preprocessVariables ()
_setClientId (line 339)

Sets client id

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

Sets article id

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

Sets language id

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

Sets path resolver and category id

  • access: private
void _setPathresolverSetting ()

Documentation generated on Sun, 03 Aug 2008 22:21:51 +0200 by phpDocumentor 1.4.0