Smarty_Compiler_Include_If_Exists

Extends \Smarty_Internal_CompileBase

Smarty Plugin Compile Include If Exists for Smarty v3

Compiles the {include_if_exists} tag

Inspired by Liu Song's similar plugin for Smarty v2

see
author

Attila Fulop

author

Uwe Tews

version 2016-05-03
license

MIT

example

file="foo.tpl" else="default.tpl"}

package

Default

Methods

Compiles code for the {include_if_exists} tag

compile(array $args, \Smarty_Internal_SmartyTemplateCompiler $compiler, array $parameter = null) : string

Arguments

$args

array

array with attributes from parser

$compiler

\Smarty_Internal_SmartyTemplateCompiler

compiler object

$parameter

array

array with compilation parameter

Response

string

compiled code

Properties

Instance of {include} compiler

includeCompiler : \Smarty_Internal_Compile_Include
static
var

Type(s)

\Smarty_Internal_Compile_Include