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 Registered Function
 4:  * Compiles code for the execution of a registered function
 5:  *
 6:  * @package    Smarty
 7:  * @subpackage Compiler
 8:  * @author     Uwe Tews
 9:  */
10: 
11: /**
12:  * Smarty Internal Plugin Compile Registered Function Class
13:  *
14:  * @package    Smarty
15:  * @subpackage Compiler
16:  */
17: class Smarty_Internal_Compile_Private_Registered_Function extends Smarty_Internal_CompileBase
18: {
19:     /**
20:      * Attribute definition: Overwrites base class.
21:      *
22:      * @var array
23:      * @see Smarty_Internal_CompileBase
24:      */
25:     public $optional_attributes = array('_any');
26: 
27:     /**
28:      * Compiles code for the execution of a registered function
29:      *
30:      * @param  array  $args      array with attributes from parser
31:      * @param  object $compiler  compiler object
32:      * @param  array  $parameter array with compilation parameter
33:      * @param  string $tag       name of function
34:      *
35:      * @return string compiled code
36:      */
37:     public function compile($args, $compiler, $parameter, $tag)
38:     {
39:         // This tag does create output
40:         $compiler->has_output = true;
41:         // check and get attributes
42:         $_attr = $this->getAttributes($compiler, $args);
43:         if ($_attr['nocache']) {
44:             $compiler->tag_nocache = true;
45:         }
46:         unset($_attr['nocache']);
47:         if (isset($compiler->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION][$tag])) {
48:             $tag_info = $compiler->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION][$tag];
49:         } else {
50:             $tag_info = $compiler->default_handler_plugins[Smarty::PLUGIN_FUNCTION][$tag];
51:         }
52:         // not cachable?
53:         $compiler->tag_nocache = $compiler->tag_nocache || !$tag_info[1];
54:         // convert attributes into parameter array string
55:         $_paramsArray = array();
56:         foreach ($_attr as $_key => $_value) {
57:             if (is_int($_key)) {
58:                 $_paramsArray[] = "$_key=>$_value";
59:             } elseif ($compiler->template->caching && in_array($_key, $tag_info[2])) {
60:                 $_value = str_replace("'", "^#^", $_value);
61:                 $_paramsArray[] = "'$_key'=>^#^.var_export($_value,true).^#^";
62:             } else {
63:                 $_paramsArray[] = "'$_key'=>$_value";
64:             }
65:         }
66:         $_params = 'array(' . implode(",", $_paramsArray) . ')';
67:         $function = $tag_info[0];
68:         // compile code
69:         if (!is_array($function)) {
70:             $output = "<?php echo {$function}({$_params},\$_smarty_tpl);?>\n";
71:         } elseif (is_object($function[0])) {
72:             $output = "<?php echo \$_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['{$tag}'][0][0]->{$function[1]}({$_params},\$_smarty_tpl);?>\n";
73:         } else {
74:             $output = "<?php echo {$function[0]}::{$function[1]}({$_params},\$_smarty_tpl);?>\n";
75:         }
76: 
77:         return $output;
78:     }
79: }
80: 
CMS CONTENIDO 4.9.7 API documentation generated by ApiGen