\Smarty_Internal_Compile_Extends

Smarty Internal Plugin Compile extend Class

Summary

Methods
Properties
Constants
registerInit()
postCompile()
getAttributes()
openTag()
closeTag()
compile()
extendsSourceArrayCode()
$required_attributes
$optional_attributes
$shorttag_order
$option_flags
$optionMap
$mapCache
No constants found
No protected methods found
No protected properties found
N/A
compileEndChild()
compileInclude()
No private properties found
N/A

Properties

$required_attributes

$required_attributes : array

Attribute definition: Overwrites base class.

Type

array

$optional_attributes

$optional_attributes : array

Array of names of optional attribute required by tag use array('_any') if there is no restriction of attributes names

Type

array

$shorttag_order

$shorttag_order : array

Attribute definition: Overwrites base class.

Type

array

$option_flags

$option_flags : array

Array of names of valid option flags

Type

array

$optionMap

$optionMap : array

Mapping array for boolqn option value

Type

array

$mapCache

$mapCache : array

Mapping array with attributes as key

Type

array

Methods

registerInit()

registerInit(\Smarty_Internal_TemplateCompilerBase  $compiler, boolean|false  $initChildSequence = false) 

Register post compile callback to compile inheritance initialization code

Parameters

\Smarty_Internal_TemplateCompilerBase $compiler
boolean|false $initChildSequence

if true force child template

postCompile()

postCompile(\Smarty_Internal_TemplateCompilerBase  $compiler, boolean|false  $initChildSequence = false) 

Compile inheritance initialization code as prefix

Parameters

\Smarty_Internal_TemplateCompilerBase $compiler
boolean|false $initChildSequence

if true force child template

getAttributes()

getAttributes(object  $compiler, array  $attributes) : array

This function checks if the attributes passed are valid The attributes passed for the tag to compile are checked against the list of required and optional attributes. Required attributes must be present. Optional attributes are check against the corresponding list. The keyword '_any' specifies that any attribute will be accepted as valid

Parameters

object $compiler

compiler object

array $attributes

attributes applied to the tag

Returns

array —

of mapped attributes for further processing

openTag()

openTag(object  $compiler, string  $openTag, mixed  $data = null) 

Push opening tag name on stack Optionally additional data can be saved on stack

Parameters

object $compiler

compiler object

string $openTag

the opening tag's name

mixed $data

optional data saved

closeTag()

closeTag(object  $compiler, array|string  $expectedTag) : mixed

Pop closing tag Raise an error if this stack-top doesn't match with expected opening tags

Parameters

object $compiler

compiler object

array|string $expectedTag

the expected opening tag names

Returns

mixed —

any type the opening tag's name or saved data

compile()

compile(array  $args, \Smarty_Internal_TemplateCompilerBase  $compiler) : string

Compiles code for the {extends} tag extends: resource

Parameters

array $args

array with attributes from parser

\Smarty_Internal_TemplateCompilerBase $compiler

compiler object

Throws

\SmartyCompilerException
\SmartyException

Returns

string —

compiled code

extendsSourceArrayCode()

extendsSourceArrayCode(\[]\Smarty_Internal_Template_Source  $components) : string

Create source code for {extends} from source components array

Parameters

\[]\Smarty_Internal_Template_Source $components

Returns

string

compileEndChild()

compileEndChild(\Smarty_Internal_TemplateCompilerBase  $compiler, null|string  $template = null) 

Add code for inheritance endChild() method to end of template

Parameters

\Smarty_Internal_TemplateCompilerBase $compiler
null|string $template

optional inheritance parent template

compileInclude()

compileInclude(\Smarty_Internal_TemplateCompilerBase  $compiler, string  $template) 

Add code for including subtemplate to end of template

Parameters

\Smarty_Internal_TemplateCompilerBase $compiler
string $template

subtemplate name