Class to handle compiling template tag calls for "foreach".

package XenForo_Template

 Methods

Compile the specified tag and return PHP code to handle it.

compile(\XenForo_Template_Compiler $compiler, string $tag, array $attributes, array $children, array $options) : string

Parameters

$compiler

\XenForo_Template_Compiler

The invoking compiler

$tag

string

Name of the tag called

$attributes

array

Attributes for the tag (may be empty)

$children

array

Nodes (tags/curlies/text) within this tag (may be empty)

$options

array

Compilation options

Returns

string

Helper to allow foreach tags to be compiled in multiple places with easier validation.

compileForeach(string $inner, \XenForo_Template_Compiler $compiler, array $attributes, array $options) : \XenForo_Compiler_Statement_Raw
Static

Parameters

$inner

string

Compiled inner code

$attributes

array

$options

array

Returns

\XenForo_Compiler_Statement_Raw