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
Method Summary
 ModRewriteController ModRewriteController (string $incommingUrl)
 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 $_bRoutingFound = false (line 103)

Flag about found routing definition

int $_iClientMR (line 89)

Client id used by this class

string $_sArtName (line 61)

Extracted article name from request uri

string $_sIncommingUrl (line 75)

Incomming URL

string $_sPath (line 68)

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

string $_sResolvedUrl (line 82)

Resolved URL

Methods
Constructor ModRewriteController (line 110)

Constructor, sets several properties.

ModRewriteController ModRewriteController (string $incommingUrl)
  • string $incommingUrl: Incomming URL
errorOccured (line 213)

Getter for occured error state

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Getter for resolved url

  • return: Resolved url
string getResolvedUrl ()
getRoutingFoundState (line 203)

Returns a flag about found routing definition

return bool Flag about found routing

void getRoutingFoundState ()
parseUrl (line 603)
void parseUrl ( $url)
  • $url
_extractRequestUri (line 262)

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

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

Returns state of parts property

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

Overrides local mod rewrite cfg settings with client settings from database

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

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

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

Sets client id

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

Sets article id

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

Sets language id

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

Sets path resolver and category id

  • access: private
void _setPathresolverSetting ()

Documentation generated on Mon, 08 Sep 2008 03:08:43 +0200 by phpDocumentor 1.4.0