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

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

Extracted request uri path parts by path separator '/'

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

Flag about occured errors

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

Flag about found routing definition

  • access: private
int $_iClientMR (line 71)

Client id used by this class

  • access: private
string $_sArtName (line 43)

Extracted article name from request uri

  • access: private
string $_sIncommingUrl (line 57)

Incomming URL

  • access: private
string $_sPath (line 50)

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

  • access: private
string $_sResolvedUrl (line 64)

Resolved URL

  • access: private

Inherited Variables

Inherited from ModRewriteBase

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

Constructor, sets several properties.

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

Getter for occured error state

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Getter for resolved url

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

Returns a flag about found routing definition

return bool Flag about found routing

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

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

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

Returns state of parts property.

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

Tries to initialize the client id

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

Parses the url using defined separators

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

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

Sets client id

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

Sets article id

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

Sets language id

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

Sets path resolver and category id

  • access: private
void _setPathresolverSetting ()

Inherited Methods

Inherited From ModRewriteBase

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

Documentation generated on Sun, 08 Feb 2009 22:00:35 +0100 by phpDocumentor 1.4.1