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 Resource Eval
 4:  *
 5:  * @package    Smarty
 6:  * @subpackage TemplateResources
 7:  * @author     Uwe Tews
 8:  * @author     Rodney Rehm
 9:  */
10: 
11: /**
12:  * Smarty Internal Plugin Resource Eval
13:  * Implements the strings as resource for Smarty template
14:  * {@internal unlike string-resources the compiled state of eval-resources is NOT saved for subsequent access}}
15:  *
16:  * @package    Smarty
17:  * @subpackage TemplateResources
18:  */
19: class Smarty_Internal_Resource_Eval extends Smarty_Resource_Recompiled
20: {
21:     /**
22:      * populate Source Object with meta data from Resource
23:      *
24:      * @param  Smarty_Template_Source   $source    source object
25:      * @param  Smarty_Internal_Template $_template template object
26:      *
27:      * @return void
28:      */
29:     public function populate(Smarty_Template_Source $source, Smarty_Internal_Template $_template = null)
30:     {
31:         $source->uid = $source->filepath = sha1($source->name);
32:         $source->timestamp = false;
33:         $source->exists = true;
34:     }
35: 
36:     /**
37:      * Load template's source from $resource_name into current template object
38:      *
39:      * @uses decode() to decode base64 and urlencoded template_resources
40:      *
41:      * @param  Smarty_Template_Source $source source object
42:      *
43:      * @return string                 template source
44:      */
45:     public function getContent(Smarty_Template_Source $source)
46:     {
47:         return $this->decode($source->name);
48:     }
49: 
50:     /**
51:      * decode base64 and urlencode
52:      *
53:      * @param  string $string template_resource to decode
54:      *
55:      * @return string decoded template_resource
56:      */
57:     protected function decode($string)
58:     {
59:         // decode if specified
60:         if (($pos = strpos($string, ':')) !== false) {
61:             if (!strncmp($string, 'base64', 6)) {
62:                 return base64_decode(substr($string, 7));
63:             } elseif (!strncmp($string, 'urlencode', 9)) {
64:                 return urldecode(substr($string, 10));
65:             }
66:         }
67: 
68:         return $string;
69:     }
70: 
71:     /**
72:      * modify resource_name according to resource handlers specifications
73:      *
74:      * @param  Smarty  $smarty        Smarty instance
75:      * @param  string  $resource_name resource_name to make unique
76:      * @param  boolean $is_config     flag for config resource
77:      *
78:      * @return string unique resource name
79:      */
80:     protected function buildUniqueResourceName(Smarty $smarty, $resource_name, $is_config = false)
81:     {
82:         return get_class($this) . '#' . $this->decode($resource_name);
83:     }
84: 
85:     /**
86:      * Determine basename for compiled filename
87:      *
88:      * @param  Smarty_Template_Source $source source object
89:      *
90:      * @return string                 resource's basename
91:      */
92:     protected function getBasename(Smarty_Template_Source $source)
93:     {
94:         return '';
95:     }
96: }
97: 
CMS CONTENIDO 4.9.7 API documentation generated by ApiGen