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
    • ContentRssCreator
    • ContentSitemapHtml
    • ContentSitemapXml
    • ContentUserForum
    • NavigationTop
    • ScriptCookieDirective
  • 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
  • Smarty
    • Cacher
    • Compiler
    • Config
    • Debug
    • PluginsBlock
    • PluginsFilter
    • PluginsFunction
    • PluginsInternal
    • PluginsModifier
    • PluginsModifierCompiler
    • PluginsShared
    • Security
    • Template
    • TemplateResources
  • Swift
    • ByteStream
    • CharacterStream
    • Encoder
    • Events
    • KeyCache
    • Mailer
    • Mime
    • Plugins
    • Transport

Classes

  • Swift_FailoverTransport
  • Swift_LoadBalancedTransport
  • Swift_MailTransport
  • Swift_Plugins_Loggers_ArrayLogger
  • Swift_Plugins_Loggers_EchoLogger
  • Swift_SendmailTransport
  • Swift_SmtpTransport
  • Swift_Transport_AbstractSmtpTransport
  • Swift_Transport_Esmtp_Auth_CramMd5Authenticator
  • Swift_Transport_Esmtp_Auth_LoginAuthenticator
  • Swift_Transport_Esmtp_Auth_PlainAuthenticator
  • Swift_Transport_Esmtp_AuthHandler
  • Swift_Transport_EsmtpTransport
  • Swift_Transport_FailoverTransport
  • Swift_Transport_LoadBalancedTransport
  • Swift_Transport_MailTransport
  • Swift_Transport_SendmailTransport
  • Swift_Transport_SimpleMailInvoker
  • Swift_Transport_StreamBuffer

Interfaces

  • Swift_Plugins_Logger
  • Swift_Plugins_Pop_Pop3Exception
  • Swift_Transport
  • Swift_Transport_Esmtp_Authenticator
  • Swift_Transport_EsmtpHandler
  • Swift_Transport_IoBuffer
  • Swift_Transport_MailInvoker
  • Swift_Transport_SmtpAgent
  • Swift_TransportException
  • Overview
  • Package
  • Function
  • Todo
  • Download
 1: <?php
 2: /**
 3:  * AMR base Mod Rewrite class
 4:  *
 5:  * @package     Plugin
 6:  * @subpackage  ModRewrite
 7:  * @version     SVN Revision $Rev:$
 8:  * @id          $Id$:
 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.7 API documentation generated by ApiGen