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

  • Smarty_Config_Source
  • Smarty_Internal_Resource_Eval
  • Smarty_Internal_Resource_Extends
  • Smarty_Internal_Resource_File
  • Smarty_Internal_Resource_PHP
  • Smarty_Internal_Resource_Stream
  • Smarty_Internal_Resource_String
  • Smarty_Resource
  • Smarty_Resource_Custom
  • Smarty_Resource_Recompiled
  • Smarty_Resource_Uncompiled
  • Smarty_Template_Cached
  • Smarty_Template_Compiled
  • Smarty_Template_Source
  • Overview
  • Package
  • Class
  • Todo
  • Download

Class Smarty_Resource

Smarty Resource Plugin Base implementation for resource plugins

Direct known subclasses

Smarty_Internal_Resource_Extends, Smarty_Internal_Resource_File, Smarty_Internal_Resource_String, Smarty_Resource_Custom, Smarty_Resource_Recompiled, Smarty_Resource_Uncompiled

Indirect known subclasses

Smarty_Internal_Resource_Eval, Smarty_Internal_Resource_PHP, Smarty_Internal_Resource_Stream
Abstract
Package: Smarty\TemplateResources
Author: Rodney Rehm
Located at plugins/smarty/smarty_source/sysplugins/smarty_resource.php
Methods summary
abstract public string
# getContent( Smarty_Template_Source $source )

Load template's source into current template object }

Load template's source into current template object }

Parameters

$source
source object

Returns

string
template source

Throws

SmartyException
if source cannot be loaded
abstract public
# populate( Smarty_Template_Source $source, Smarty_Internal_Template $_template = null )

populate Source Object with meta data from Resource

populate Source Object with meta data from Resource

Parameters

$source
source object
$_template
template object
public
# populateTimestamp( Smarty_Template_Source $source )

populate Source Object with timestamp and exists from Resource

populate Source Object with timestamp and exists from Resource

Parameters

$source
source object
protected string
# buildUniqueResourceName( Smarty $smarty, string $resource_name, boolean $is_config = false )

modify resource_name according to resource handlers specifications

modify resource_name according to resource handlers specifications

Parameters

$smarty
Smarty instance
$resource_name
resource_name to make unique
$is_config
flag for config resource

Returns

string
unique resource name
public
# populateCompiledFilepath( Smarty_Template_Compiled $compiled, Smarty_Internal_Template $_template )

populate Compiled Object with compiled filepath

populate Compiled Object with compiled filepath

Parameters

$compiled
compiled object
$_template
template object
protected string
# normalizePath( string $_path, boolean $ds = true )

Normalize Paths "foo/../bar" to "bar"

Normalize Paths "foo/../bar" to "bar"

Parameters

$_path
path to normalize
$ds
respect windows directory separator

Returns

string
normalized path
protected string
# buildFilepath( Smarty_Template_Source $source, Smarty_Internal_Template $_template = null )

build template filepath by traversing the template_dir array

build template filepath by traversing the template_dir array

Parameters

$source
source object
$_template
template object

Returns

string
fully qualified filepath

Throws

SmartyException
if default template handler is registered but not callable
protected boolean
# fileExists( Smarty_Template_Source $source, string $file )

test is file exists and save timestamp

test is file exists and save timestamp

Parameters

$source
source object
$file
file name

Returns

boolean
true if file exists
protected string
# getBasename( Smarty_Template_Source $source )

Determine basename for compiled filename

Determine basename for compiled filename

Parameters

$source
source object

Returns

string
resource's basename
public static Smarty_Resource
# load( Smarty $smarty, string $type )

Load Resource Handler

Load Resource Handler

Parameters

$smarty
smarty object
$type
name of the resource

Returns

Smarty_Resource
Resource Handler

Throws

SmartyException
protected static
# parseResourceName( string $resource_name, string $default_resource, string & $name, string & $type )

extract resource_type and resource_name from template_resource and config_resource

extract resource_type and resource_name from template_resource and config_resource

Parameters

$resource_name
template_resource or config_resource to parse
$default_resource
the default resource_type defined in $smarty
$name
$name the parsed resource name
$type
$type the parsed resource type

Note

"C:/foo.tpl" was forced to file resource up till Smarty 3.1.3 (including).
public static string
# getUniqueTemplateName( Smarty_Internal_template $template, string $template_resource )

modify template_resource according to resource handlers specifications

modify template_resource according to resource handlers specifications

Parameters

$template
Smarty instance
$template_resource
template_resource to extract resource handler and name of

Returns

string
unique resource name
public static Smarty_Template_Source
# source( Smarty_Internal_Template $_template = null, Smarty $smarty = null, string $template_resource = null )

initialize Source Object for given resource Either [$_template] or [$smarty, $template_resource] must be specified

initialize Source Object for given resource Either [$_template] or [$smarty, $template_resource] must be specified

Parameters

$_template
template object
$smarty
smarty object
$template_resource
resource identifier

Returns

Smarty_Template_Source
Source Object
public static Smarty_Config_Source
# config( Smarty_Internal_Config $_config )

initialize Config Source Object for given resource

initialize Config Source Object for given resource

Parameters

$_config
config object

Returns

Smarty_Config_Source
Source Object

Throws

SmartyException
Properties summary
public static array $sources

cache for Smarty_Template_Source instances

cache for Smarty_Template_Source instances

# array()
public static array $compileds

cache for Smarty_Template_Compiled instances

cache for Smarty_Template_Compiled instances

# array()
public static array $resources

cache for Smarty_Resource instances

cache for Smarty_Resource instances

# array()
protected static array $sysplugins

resource types provided by the core

resource types provided by the core

# array( 'file' => true, 'string' => true, 'extends' => true, 'stream' => true, 'eval' => true, 'php' => true )
public string $compiler_class

Name of the Class to compile this resource's contents with

Name of the Class to compile this resource's contents with

# 'Smarty_Internal_SmartyTemplateCompiler'
public string $template_lexer_class

Name of the Class to tokenize this resource's contents with

Name of the Class to tokenize this resource's contents with

# 'Smarty_Internal_Templatelexer'
public string $template_parser_class

Name of the Class to parse this resource's contents with

Name of the Class to parse this resource's contents with

# 'Smarty_Internal_Templateparser'
CMS CONTENIDO 4.9.7 API documentation generated by ApiGen