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 Filter Handler
 4:  * Smarty filter handler class
 5:  *
 6:  * @package    Smarty
 7:  * @subpackage PluginsInternal
 8:  * @author     Uwe Tews
 9:  */
10: 
11: /**
12:  * Class for filter processing
13:  *
14:  * @package    Smarty
15:  * @subpackage PluginsInternal
16:  */
17: class Smarty_Internal_Filter_Handler
18: {
19:     /**
20:      * Run filters over content
21:      * The filters will be lazy loaded if required
22:      * class name format: Smarty_FilterType_FilterName
23:      * plugin filename format: filtertype.filtername.php
24:      * Smarty2 filter plugins could be used
25:      *
26:      * @param  string                   $type     the type of filter ('pre','post','output') which shall run
27:      * @param  string                   $content  the content which shall be processed by the filters
28:      * @param  Smarty_Internal_Template $template template object
29:      *
30:      * @throws SmartyException
31:      * @return string                   the filtered content
32:      */
33:     public static function runFilter($type, $content, Smarty_Internal_Template $template)
34:     {
35:         $output = $content;
36:         // loop over autoload filters of specified type
37:         if (!empty($template->smarty->autoload_filters[$type])) {
38:             foreach ((array) $template->smarty->autoload_filters[$type] as $name) {
39:                 $plugin_name = "Smarty_{$type}filter_{$name}";
40:                 if ($template->smarty->loadPlugin($plugin_name)) {
41:                     if (function_exists($plugin_name)) {
42:                         // use loaded Smarty2 style plugin
43:                         $output = $plugin_name($output, $template);
44:                     } elseif (class_exists($plugin_name, false)) {
45:                         // loaded class of filter plugin
46:                         $output = call_user_func(array($plugin_name, 'execute'), $output, $template);
47:                     }
48:                 } else {
49:                     // nothing found, throw exception
50:                     throw new SmartyException("Unable to load filter {$plugin_name}");
51:                 }
52:             }
53:         }
54:         // loop over registerd filters of specified type
55:         if (!empty($template->smarty->registered_filters[$type])) {
56:             foreach ($template->smarty->registered_filters[$type] as $key => $name) {
57:                 if (is_array($template->smarty->registered_filters[$type][$key])) {
58:                     $output = call_user_func($template->smarty->registered_filters[$type][$key], $output, $template);
59:                 } else {
60:                     $output = $template->smarty->registered_filters[$type][$key]($output, $template);
61:                 }
62:             }
63:         }
64:         // return filtered output
65:         return $output;
66:     }
67: }
68: 
CMS CONTENIDO 4.9.7 API documentation generated by ApiGen