Overview

Packages

  • CONTENIDO
  • Core
    • Authentication
    • Backend
    • Cache
    • CEC
    • Chain
    • ContentType
    • Database
    • Debug
    • Exception
    • Frontend
      • Search
      • URI
      • Util
    • GenericDB
      • Model
    • GUI
      • HTML
    • I18N
    • LayoutHandler
    • Log
    • Security
    • Session
    • Util
    • Validation
    • Versioning
    • XML
  • Module
    • ContentSitemapHtml
    • ContentSitemapXml
    • ContentUserForum
    • NavigationTop
    • ScriptCookieDirective
  • mpAutoloaderClassMap
  • None
  • PHP
  • Plugin
    • ContentAllocation
    • CronjobOverview
    • FormAssistant
    • FrontendLogic
    • FrontendUsers
    • Linkchecker
    • ModRewrite
    • Newsletter
    • Repository
      • FrontendNavigation
      • KeywordDensity
    • SmartyWrapper
    • UrlShortener
    • UserForum
    • Workflow
  • PluginManager
  • Setup
    • Form
    • GUI
    • Helper
      • Environment
      • Filesystem
      • MySQL
      • PHP
    • UpgradeJob

Classes

  • cUriBuilderMR
  • ModRewrite
  • ModRewrite_ContentController
  • ModRewrite_ContentExpertController
  • ModRewrite_ContentTestController
  • ModRewrite_ControllerAbstract
  • ModRewriteBase
  • ModRewriteController
  • ModRewriteDebugger
  • ModRewriteTest
  • ModRewriteUrlStack
  • ModRewriteUrlUtil

Functions

  • mr_arrayValue
  • mr_buildGeneratedCode
  • mr_buildNewUrl
  • mr_conCopyArtLang
  • mr_conMoveArticles
  • mr_conSaveArticle
  • mr_conSyncArticle
  • mr_debugOutput
  • mr_getConfiguration
  • mr_getConfigurationFilePath
  • mr_getRequest
  • mr_header
  • mr_i18n
  • mr_loadConfiguration
  • mr_queryAndNextRecord
  • mr_removeMultipleChars
  • mr_requestCleanup
  • mr_runFrontendController
  • mr_setClientLanguageId
  • mr_setConfiguration
  • mr_strCopyCategory
  • mr_strMovedownCategory
  • mr_strMoveSubtree
  • mr_strMoveUpCategory
  • mr_strNewCategory
  • mr_strNewTree
  • mr_strRenameCategory
  • mr_strSyncCategory
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo
 1: <?php
 2: /**
 3:  * AMR base Mod Rewrite class
 4:  *
 5:  * @package     Plugin
 6:  * @subpackage  ModRewrite
 7:  * @id          $Id$:
 8:  * @author      Murat Purc <murat@purc.de>
 9:  * @copyright   four for business AG <www.4fb.de>
10:  * @license     http://www.contenido.org/license/LIZENZ.txt
11:  * @link        http://www.4fb.de
12:  * @link        http://www.contenido.org
13:  */
14: 
15: defined('CON_FRAMEWORK') || die('Illegal call: Missing framework initialization - request aborted.');
16: 
17: /**
18:  * Abstract base mod rewrite class.
19:  *
20:  * Provides some common features such as common debugging, globals/configuration
21:  * access for childs.
22:  *
23:  * @author      Murat Purc <murat@purc.de>
24:  * @package     Plugin
25:  * @subpackage  ModRewrite
26:  */
27: abstract class ModRewriteBase {
28: 
29:     /**
30:      * Returns enabled state of mod rewrite plugin
31:      *
32:      * @return  bool
33:      */
34:     public static function isEnabled() {
35:         return (self::getConfig('use', 0) == 1) ? true : false;
36:     }
37: 
38:     /**
39:      * Sets the enabled state of mod rewrite plugin
40:      *
41:      * @param  bool  $bEnabled
42:      */
43:     public static function setEnabled($bEnabled) {
44:         self::setConfig('use', (bool) $bEnabled);
45:     }
46: 
47:     /**
48:      * Returns configuration of mod rewrite, content of gobal $cfg['mod_rewrite']
49:      *
50:      * @param   string  $key  Name of configuration key
51:      * @param   mixed   $default  Default value to return as a fallback
52:      * @return  mixed   Desired value mr configuration, either the full configuration
53:      *                  or one of the desired subpart
54:      */
55:     public static function getConfig($key = NULL, $default = NULL) {
56:         global $cfg;
57:         if ($key == NULL) {
58:             return $cfg['mod_rewrite'];
59:         } elseif ((string) $key !== '') {
60:             return (isset($cfg['mod_rewrite'][$key])) ? $cfg['mod_rewrite'][$key] : $default;
61:         } else {
62:             return $default;
63:         }
64:     }
65: 
66:     /**
67:      * Sets the configuration of mod rewrite, content of gobal $cfg['mod_rewrite']
68:      *
69:      * @param   string  $key    Name of configuration key
70:      * @param   mixed   $value  The value to set
71:      */
72:     public static function setConfig($key, $value) {
73:         global $cfg;
74:         $cfg['mod_rewrite'][$key] = $value;
75:     }
76: 
77: }
78: 
CMS CONTENIDO 4.10.0 API documentation generated by ApiGen 2.8.0