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 Function Call Handler
 4:  *
 5:  * @package    Smarty
 6:  * @subpackage PluginsInternal
 7:  * @author     Uwe Tews
 8:  */
 9: 
10: /**
11:  * This class does call function defined with the {function} tag
12:  *
13:  * @package    Smarty
14:  * @subpackage PluginsInternal
15:  */
16: class Smarty_Internal_Function_Call_Handler
17: {
18:     /**
19:      * This function handles calls to template functions defined by {function}
20:      * It does create a PHP function at the first call
21:      *
22:      * @param string                   $_name     template function name
23:      * @param Smarty_Internal_Template $_template template object
24:      * @param array                    $_params   Smarty variables passed as call parameter
25:      * @param string                   $_hash     nocache hash value
26:      * @param bool                     $_nocache  nocache flag
27:      */
28:     public static function call($_name, Smarty_Internal_Template $_template, $_params, $_hash, $_nocache)
29:     {
30:         if ($_nocache) {
31:             $_function = "smarty_template_function_{$_name}_nocache";
32:         } else {
33:             $_function = "smarty_template_function_{$_hash}_{$_name}";
34:         }
35:         if (!is_callable($_function)) {
36:             $_code = "function {$_function}(\$_smarty_tpl,\$params) {
37:     \$saved_tpl_vars = \$_smarty_tpl->tpl_vars;
38:     foreach (\$_smarty_tpl->smarty->template_functions['{$_name}']['parameter'] as \$key => \$value) {\$_smarty_tpl->tpl_vars[\$key] = new Smarty_variable(\$value);};
39:     foreach (\$params as \$key => \$value) {\$_smarty_tpl->tpl_vars[\$key] = new Smarty_variable(\$value);}?>";
40:             if ($_nocache) {
41:                 $_code .= preg_replace(array("!<\?php echo \\'/\*%%SmartyNocache:{$_template->smarty->template_functions[$_name]['nocache_hash']}%%\*/|/\*/%%SmartyNocache:{$_template->smarty->template_functions[$_name]['nocache_hash']}%%\*/\\';\?>!",
42:                                              "!\\\'!"), array('', "'"), $_template->smarty->template_functions[$_name]['compiled']);
43:                 $_template->smarty->template_functions[$_name]['called_nocache'] = true;
44:             } else {
45:                 $_code .= preg_replace("/{$_template->smarty->template_functions[$_name]['nocache_hash']}/", $_template->properties['nocache_hash'], $_template->smarty->template_functions[$_name]['compiled']);
46:             }
47:             $_code .= "<?php \$_smarty_tpl->tpl_vars = \$saved_tpl_vars;}";
48:             eval($_code);
49:         }
50:         $_function($_template, $_params);
51:     }
52: }
53: 
CMS CONTENIDO 4.9.7 API documentation generated by ApiGen