Class ModRewriteController

Description

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

  • $idart
  • $idcat
  • $client
  • $changeclient
  • $lang
  • $changelang

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

ModRewriteBase
   |
   --ModRewriteController
Variable Summary
Method Summary
 ModRewriteController __construct (string $incommingUrl)
 bool errorOccured ()
 void execute ()
 int getChangeLang ()
 int getClient ()
 int getIdArt ()
 int getIdCat ()
 int getLang ()
 string getPath ()
 string getResolvedUrl ()
 void _extractRequestUri ([bool $secondCall = false])
 string _parseUrl (string $url)
 void _postValidation ()
 void _setClientId ()
 void _setIdart ()
 void _setLanguageId ()
Variables
array $_aParts (line 38)

Extracted request uri path parts by path separator '/'

  • access: private
bool $_bError = false (line 80)

Flag about occured errors

  • access: private
bool $_bRoutingFound = false (line 87)

Flag about found routing definition

  • access: private
int $_iClientMR (line 73)

Client id used by this class

  • access: private
string $_sArtName (line 45)

Extracted article name from request uri

  • access: private
string $_sIncommingUrl (line 59)

Incomming URL

  • access: private
string $_sPath (line 52)

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

  • access: private
string $_sResolvedUrl (line 66)

Resolved URL

  • access: private

Inherited Variables

Inherited from ModRewriteBase

ModRewriteBase::$_oDebug
ModRewriteBase::$_oGlobals
Methods
Constructor __construct (line 95)

Constructor, sets several properties.

  • access: public
ModRewriteController __construct (string $incommingUrl)
  • string $incommingUrl: Incomming URL
errorOccured (line 197)

Getter for occured error state

  • return: Flag for occured error
  • access: public
bool errorOccured ()
execute (line 208)

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

  • access: public
void execute ()
getChangeClient (line 117)

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

  • return: Change client id
  • access: public
int getChangeClient ()
getChangeLang (line 157)

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

  • return: Change language id
  • access: public
int getChangeLang ()
getClient (line 107)

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

  • return: Client id
  • access: public
int getClient ()
getIdArt (line 127)

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

  • return: Article id
  • access: public
int getIdArt ()
getIdCat (line 137)

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

  • return: Category id
  • access: public
int getIdCat ()
getLang (line 147)

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

  • return: Language id
  • access: public
int getLang ()
getPath (line 167)

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

  • return: Path, used by path resolver
  • access: public
string getPath ()
getResolvedUrl (line 177)

Getter for resolved url

  • return: Resolved url
  • access: public
string getResolvedUrl ()
getRoutingFoundState (line 187)

Returns a flag about found routing definition

return bool Flag about found routing

  • access: public
void getRoutingFoundState ()
_extractRequestUri (line 241)

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

  • access: private
void _extractRequestUri ([bool $secondCall = false])
  • bool $secondCall: Flag about secont call of this function, is needed to re extract url if a routing definition was found
_hasPartArrayItems (line 598)

Returns state of parts property.

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

Tries to initialize the client id

  • access: private
void _initializeClientId ()
_parseUrl (line 562)

Parses the url using defined separators

  • return: Parsed url
  • access: private
string _parseUrl (string $url)
  • string $url: Incoming url
_postValidation (line 510)

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.

  • access: private
void _postValidation ()
_setClientId (line 353)

Sets client id

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

Sets article id

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

Sets language id

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

Sets path resolver and category id

  • access: private
void _setPathresolverSetting ()

Inherited Methods

Inherited From ModRewriteBase

 ModRewriteBase::getConfig()
 ModRewriteBase::initialize()
 ModRewriteBase::isEnabled()

Documentation generated on Tue, 25 Nov 2008 22:07:25 +0100 by phpDocumentor 1.4.1