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:  * Smarty Internal Plugin Compile Config Load
 4:  * Compiles the {config load} tag
 5:  *
 6:  * @package    Smarty
 7:  * @subpackage Compiler
 8:  * @author     Uwe Tews
 9:  */
10: 
11: /**
12:  * Smarty Internal Plugin Compile Config Load Class
13:  *
14:  * @package    Smarty
15:  * @subpackage Compiler
16:  */
17: class Smarty_Internal_Compile_Config_Load extends Smarty_Internal_CompileBase
18: {
19:     /**
20:      * Attribute definition: Overwrites base class.
21:      *
22:      * @var array
23:      * @see Smarty_Internal_CompileBase
24:      */
25:     public $required_attributes = array('file');
26:     /**
27:      * Attribute definition: Overwrites base class.
28:      *
29:      * @var array
30:      * @see Smarty_Internal_CompileBase
31:      */
32:     public $shorttag_order = array('file', 'section');
33:     /**
34:      * Attribute definition: Overwrites base class.
35:      *
36:      * @var array
37:      * @see Smarty_Internal_CompileBase
38:      */
39:     public $optional_attributes = array('section', 'scope');
40: 
41:     /**
42:      * Compiles code for the {config_load} tag
43:      *
44:      * @param  array  $args     array with attributes from parser
45:      * @param  object $compiler compiler object
46:      *
47:      * @return string compiled code
48:      */
49:     public function compile($args, $compiler)
50:     {
51:         static $_is_legal_scope = array('local' => true, 'parent' => true, 'root' => true, 'global' => true);
52:         // check and get attributes
53:         $_attr = $this->getAttributes($compiler, $args);
54: 
55:         if ($_attr['nocache'] === true) {
56:             $compiler->trigger_template_error('nocache option not allowed', $compiler->lex->taglineno);
57:         }
58: 
59:         // save possible attributes
60:         $conf_file = $_attr['file'];
61:         if (isset($_attr['section'])) {
62:             $section = $_attr['section'];
63:         } else {
64:             $section = 'null';
65:         }
66:         $scope = 'local';
67:         // scope setup
68:         if (isset($_attr['scope'])) {
69:             $_attr['scope'] = trim($_attr['scope'], "'\"");
70:             if (isset($_is_legal_scope[$_attr['scope']])) {
71:                 $scope = $_attr['scope'];
72:             } else {
73:                 $compiler->trigger_template_error('illegal value for "scope" attribute', $compiler->lex->taglineno);
74:             }
75:         }
76:         // create config object
77:         $_output = "<?php  \$_config = new Smarty_Internal_Config($conf_file, \$_smarty_tpl->smarty, \$_smarty_tpl);";
78:         $_output .= "\$_config->loadConfigVars($section, '$scope'); ?>";
79: 
80:         return $_output;
81:     }
82: }
83: 
CMS CONTENIDO 4.9.7 API documentation generated by ApiGen