/core/template/TemplateParser.class.php

Description

PHP2Go Web Development Framework

Copyright (c) 2002-2007 Marcos Pont

LICENSE:

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Classes
Class Description
TemplateParser Template parser class
Constants
TEMPLATE_ASSIGN = 'ASSIGN(\s+.*)?' (line 126)

Assign pattern

TEMPLATE_BLOCK = '(START|END|INCLUDE|INCLUDESCRIPT|REUSE) BLOCK : ([a-zA-Z0-9_\.\-\\\/\~\s]+)' (line 86)

Dynamic blocks pattern

TEMPLATE_CAPTURE = '(CAPTURE|END CAPTURE)(?:\s+(.*))?' (line 130)

Capture tags pattern

TEMPLATE_COMMENT = '^\*.*\*$' (line 110)

Comments pattern

TEMPLATE_CONDITION = '(IF|ELSE IF|ELSE|END IF)[ ]?(.*)?' (line 102)

Condition tags pattern

TEMPLATE_CONFIG = 'CONFIG(?:\s+(.*))?' (line 134)

Config tag pattern

TEMPLATE_CONFIG_VARIABLE = '\#\w+(?:\.\w+)?\#' (line 74)

Config variable

TEMPLATE_DELIM_BRACE = 2 (line 45)

Tag delimiter based on curly braces: { }

TEMPLATE_DELIM_COMMENT = 1 (line 41)

Tag delimiter based on HTML comments: <!-- -->

TEMPLATE_DELIM_DIRECTIVE = 3 (line 50)

Tag delimiter based on directives: <% %>

TEMPLATE_FUNCTION = '[a-zA-Z_]\w*(::[a-zA-Z_]\w*)?' (line 78)

Functions pattern

TEMPLATE_FUNCTION_CALL = '(CALL|FUNCTION|END FUNCTION)(?:\s+(.*))?' (line 98)

Function call pattern

TEMPLATE_IGNORE = '(IGNORE|END IGNORE)' (line 94)

Ignore tags pattern

TEMPLATE_INCLUDE = 'INCLUDE BLOCK : ([a-zA-Z0-9_\.\-\\\/\~\s]+)' (line 90)

Include pattern

TEMPLATE_INNER_VARIABLE = '\$[\w\:\[\]]+(?:\.\$?[\w\:\[\]]+|->\$?[\w\:\[\]]+(?:\(\))?)*' (line 70)

Inner variable (used as a tag argument) pattern

TEMPLATE_LOOP = '(LOOP|ELSE LOOP|END LOOP)(?:\s+(.*))?' (line 106)

Loop tags pattern

TEMPLATE_MODIFIER = '((?:\|@?\w+(?::(?:\w+|'.TEMPLATE_INNER_VARIABLE.'|'.TEMPLATE_CONFIG_VARIABLE.'|'.TEMPLATE_NUMBER.'|'.TEMPLATE_QUOTED_STRING.'))*)*)' (line 82)

Variable modifier pattern

TEMPLATE_NUMBER = '(?:\-?\d+(?:\.\d+)?)' (line 58)

Number pattern

TEMPLATE_QUOTED_STRING = '(?:"[^"\\\\]*(?:\\\\.[^"\\\\]*)*"|\'[^\'\\\\]*(?:\\\\.[^\'\\\\]*)*\')' (line 54)

Quoted string pattern

TEMPLATE_VARIABLE = '\$?[\w\:\[\]]+(?:\.\$?[\w\:\[\]]+|->\$?[\w\:\[\]]+(?:\(\))?)*' (line 62)

Variable pattern

TEMPLATE_VARIABLE_NAME = '([\w\:\[\]]+)' (line 66)

Variable name pattern

TEMPLATE_WIDGET = '(INCLUDE WIDGET|WIDGET|END WIDGET)(?:\s+(.*))?' (line 114)

Widget tags pattern

TEMPLATE_WIDGET_ATTRIBUTE = '(ATTRIBUTE|END ATTRIBUTE)(?:\s+(.*))?' (line 118)

Widget attributes pattern

TEMPLATE_WIDGET_LISTENER = '(LISTENER|END LISTENER)(?:\s+(.*))?' (line 122)

Widget event listeners pattern

TP_ROOTBLOCK = '_ROOT' (line 37)

Name of the root block of a template

Documentation generated on Sun, 07 Oct 2007 19:30:24 -0300 by phpDocumentor 1.3.2