class vB_TemplateParser_Curly

Abstract class for handling tags found by vB_TemplateParser.

Methods

static array
validate(vB_Xml_Node $main_node, vB_TemplateParser $parser)

Validate the use of this tag. Can validate any aspects of the tag, including attributes, siblings, parents, and children

static string
compile(vB_Xml_Node $main_node, vB_TemplateParser $parser)

Compile this tag. Note that you must account for children as well.

static string
attributeToString(array $attribute, object $parser)

Converts a single attribute to an argument string

static string
getArgumentsFromAttributes(array $attribute_list, object $parser)

Compiles an array of attributes into an escaped argument string for use by the template eval engine at runtime

static string
handleNode(vB_Xml_Node $attribute, vB_TemplateParser $parser)

Handles a node

Details

at line 32
static array validate(vB_Xml_Node $main_node, vB_TemplateParser $parser)

Validate the use of this tag. Can validate any aspects of the tag, including attributes, siblings, parents, and children

Parameters

vB_Xml_Node $main_node DOM Node of type text
vB_TemplateParser $parser vB_TemplateParser object

Return Value

array Array of errors

at line 45
static string compile(vB_Xml_Node $main_node, vB_TemplateParser $parser)

Compile this tag. Note that you must account for children as well.

Parameters

vB_Xml_Node $main_node DOM Node of type text
vB_TemplateParser $parser vB_TemplateParser object

Return Value

string Evalable string

at line 58
static protected string attributeToString(array $attribute, object $parser)

Converts a single attribute to an argument string

Parameters

array $attribute the attribute
object $parser the parser object

Return Value

string string version of attribute

at line 90
static protected string getArgumentsFromAttributes(array $attribute_list, object $parser)

Compiles an array of attributes into an escaped argument string for use by the template eval engine at runtime

Parameters

array $attribute_list list of attributes
object $parser the parser object

Return Value

string argument portion for runtime engine call

at line 108
static protected string handleNode(vB_Xml_Node $attribute, vB_TemplateParser $parser)

Handles a node

Parameters

vB_Xml_Node $attribute the attribute
vB_TemplateParser $parser the parser object

Return Value

string the handled argument