Skip to content

Smarty_Internal_Compile_Private_Object_Function

Smarty Internal Plugin Compile Object Function Class

Properties

optional_attributes

Attribute definition: Overwrites base class.

public array $optional_attributes

See Also:

  • \Smarty_Internal_CompileBase -

Methods

compile

Compiles code for the execution of function plugin

public compile(array $args, \Smarty_Internal_TemplateCompilerBase $compiler, array $parameter, string $tag, string $method): string

Parameters:

Parameter Type Description
$args array array with attributes from parser
$compiler \Smarty_Internal_TemplateCompilerBase compiler object
$parameter array array with compilation parameter
$tag string name of function
$method string name of method to call

Return Value:

compiled code

Throws:


Inherited methods

getAttributes

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

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

Parameters:

Parameter Type Description
$compiler object compiler object
$attributes array attributes applied to the tag

Return Value:

of mapped attributes for further processing


openTag

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

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

Parameters:

Parameter Type Description
$compiler object compiler object
$openTag string the opening tag's name
$data mixed optional data saved

closeTag

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

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

Parameters:

Parameter Type Description
$compiler object compiler object
$expectedTag array|string the expected opening tag names

Return Value:

any type the opening tag's name or saved data



Automatically generated on 2025-03-18