Overview

Packages

  • Core
    • Authentication
    • Backend
    • Cache
    • CEC
    • Chain
    • ContentType
    • Database
    • Datatype
    • Debug
    • Exception
    • Frontend
      • Search
      • URI
      • Util
    • GenericDB
      • Model
    • GUI
      • HTML
    • I18N
    • LayoutHandler
    • Log
    • Security
    • Session
    • Util
    • Validation
    • Versioning
    • XML
  • Module
    • ContentSitemapHtml
    • ContentSitemapXml
    • ContentUserForum
    • NavigationTop
  • mpAutoloaderClassMap
  • None
  • Plugin
    • ContentAllocation
    • CronjobOverview
    • FormAssistant
    • FrontendLogic
    • FrontendUsers
    • Linkchecker
    • ModRewrite
    • Newsletter
    • Repository
      • FrontendNavigation
      • KeywordDensity
    • SearchSolr
    • 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_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:  * @version     SVN Revision $Rev:$
 8:  * @id          $Id: class.modrewritebase.php 5599 2013-09-30 16:14:38Z marcus.gnass $:
 9:  * @author      Murat Purc <murat@purc.de>
10:  * @copyright   four for business AG <www.4fb.de>
11:  * @license     http://www.contenido.org/license/LIZENZ.txt
12:  * @link        http://www.4fb.de
13:  * @link        http://www.contenido.org
14:  */
15: 
16: defined('CON_FRAMEWORK') || die('Illegal call: Missing framework initialization - request aborted.');
17: 
18: /**
19:  * Abstract base mod rewrite class.
20:  *
21:  * Provides some common features such as common debugging, globals/configuration
22:  * access for childs.
23:  *
24:  * @author      Murat Purc <murat@purc.de>
25:  * @package     Plugin
26:  * @subpackage  ModRewrite
27:  */
28: abstract class ModRewriteBase {
29: 
30:     /**
31:      * Returns enabled state of mod rewrite plugin
32:      *
33:      * @return  bool
34:      */
35:     public static function isEnabled() {
36:         return (self::getConfig('use', 0) == 1) ? true : false;
37:     }
38: 
39:     /**
40:      * Sets the enabled state of mod rewrite plugin
41:      *
42:      * @param  bool  $bEnabled
43:      */
44:     public static function setEnabled($bEnabled) {
45:         self::setConfig('use', (bool) $bEnabled);
46:     }
47: 
48:     /**
49:      * Returns configuration of mod rewrite, content of gobal $cfg['mod_rewrite']
50:      *
51:      * @param   string  $key  Name of configuration key
52:      * @param   mixed   $default  Default value to return as a fallback
53:      * @return  mixed   Desired value mr configuration, either the full configuration
54:      *                  or one of the desired subpart
55:      */
56:     public static function getConfig($key = NULL, $default = NULL) {
57:         global $cfg;
58:         if ($key == NULL) {
59:             return $cfg['mod_rewrite'];
60:         } elseif ((string) $key !== '') {
61:             return (isset($cfg['mod_rewrite'][$key])) ? $cfg['mod_rewrite'][$key] : $default;
62:         } else {
63:             return $default;
64:         }
65:     }
66: 
67:     /**
68:      * Sets the configuration of mod rewrite, content of gobal $cfg['mod_rewrite']
69:      *
70:      * @param   string  $key    Name of configuration key
71:      * @param   mixed   $value  The value to set
72:      */
73:     public static function setConfig($key, $value) {
74:         global $cfg;
75:         $cfg['mod_rewrite'][$key] = $value;
76:     }
77: 
78: }
79: 
CMS CONTENIDO 4.9.3 API documentation generated by ApiGen 2.8.0