Class

TemplateSyntaxParser

Package: IO\Template\parser\syntax Copyright: © 2005-2019 PHPBoost License: GNU/GPL-3.0 Author: Benoit SAUTEL ben.popeye@phpboost.com Version: PHPBoost 5.2 - last update: 2014 12 22 Since: PHPBoost 3.0 - 2010 06 17 Contributor: Loic ROUCHON horn@phpboost.com Located at: io/template/parser/syntax/TemplateSyntaxParser.class.php

template = (variableExpression | expression | condition | loop | include | text)* variableExpression = "{", variable, "}" expression = "${", expressionContent, "}" condition = "# IF ", "NOT "?, expression, "#", template, ("# ELSE #, template)?, "# ENDIF #" loop = "# START ", expression, " #", template, "# END (?:name)? #" include = "# INCLUDE ", name, " #" text = .+ expressionContent = array | function | variable | constant function = "(\w+::)?\w+(", parameters, ")" parameters = expressionContent | (expressionContent, (",", expressionContent)+) variable = simpleVar | loopVar constant = "'.+'" | [0-9]+ | array array = "array(", arrayContent, ")" arrayContent = arrayElement | (arrayElement, (",", arrayElement)+) arrayElement = expressionContent | ("'\w+'\s=>\s", expressionContent) simpleVar = "\w+" loopVar = "(\w+.)+\w+"

TemplateSyntaxParser implements TemplateParser
Methods summary
public The
# parse( string $content )

Parses the $content string.

Annonces