Exponential 6.0.13 Exponential Enterprise Open Source CMS - PHP Class Reference

Public Member Functions | Static Public Member Functions | List of all members
eZTemplateElementParser Class Reference

The class eZTemplateElementParser does. More...

## Public Member Functions
| templateTypeName ( $type)
| parseVariableTag ( $tpl, $relatedTemplateName, &$text, $startPosition, &$endPosition, $textLength, $defaultNamespace, $allowedType=false, $maxElements=false, $endMarker=false, $undefinedType=eZTemplate::TYPE_ATTRIBUTE)
| variableEndPos ( $tpl, $relatedTemplateName, &$text, $startPosition, $textLength, &$namespace, &$name, &$scope)
| unescapeCharacters ( $string)
| identifierEndPosition ( $tpl, &$text, $start_pos, $len)
| quoteEndPos ( $tpl, &$text, $startPosition, $textLength, $quote)
| numericEndPos ( $tpl, &$text, $start_pos, $len, &$float)
| whitespaceEndPos ( $tpl, &$text, $currentPosition, $textLength)
| isWhitespace ( $tpl, &$text, $startPosition)

## Static Public Member Functions
static | instance ()

## Detailed Description

The class eZTemplateElementParser does.

Definition at line 17 of file eztemplateelementparser.php.

## Member Function Documentation

## ◆ identifierEndPosition()

eZTemplateElementParser::identifierEndPosition | ( |  | $tpl,
|  | & | $text,
|  |  | $start_pos,
|  |  | $len
| ) |  |

Returns the end position of the identifier. If no identifier was found the end position is returned.

Definition at line 463 of file eztemplateelementparser.php.

Referenced by parseVariableTag(), and variableEndPos().

## ◆ instance()

static eZTemplateElementParser::instance | ( |  | ) |
| static

Returns a shared instance of the eZTemplateElementParser class.

Returns
  eZTemplateElementParser

Definition at line 590 of file eztemplateelementparser.php.

Referenced by eZTemplateMultiPassParser\__construct().

## ◆ isWhitespace()

eZTemplateElementParser::isWhitespace | ( |  | $tpl,
|  | & | $text,
|  |  | $startPosition
| ) |  |

Returns the position of the first non-whitespace characters.

Definition at line 577 of file eztemplateelementparser.php.

## ◆ numericEndPos()

eZTemplateElementParser::numericEndPos | ( |  | $tpl,
|  | & | $text,
|  |  | $start_pos,
|  |  | $len,
|  | & | $float
| ) |  |

Returns the end position of the numeric. If no numeric was found the end position is returned.

Definition at line 499 of file eztemplateelementparser.php.

Referenced by parseVariableTag().

## ◆ parseVariableTag()

eZTemplateElementParser::parseVariableTag | ( |  | $tpl,
|  |  | $relatedTemplateName,
|  | & | $text,
|  |  | $startPosition,
|  | & | $endPosition,
|  |  | $textLength,
|  |  | $defaultNamespace,
|  |  | $allowedType = `false`,
|  |  | $maxElements = `false`,
|  |  | $endMarker = `false`,
|  |  | $undefinedType = `eZTemplate::TYPE_ATTRIBUTE`
| ) |  |

Parses the variable and operators into a structure.

Definition at line 40 of file eztemplateelementparser.php.

References identifierEndPosition(), numericEndPos(), quoteEndPos(), eZTemplate\TYPE_ATTRIBUTE, eZTemplate\TYPE_ATTRIBUTE_BIT, eZTemplate\TYPE_BASIC, eZTemplate\TYPE_IDENTIFIER, eZTemplate\TYPE_IDENTIFIER_BIT, eZTemplate\TYPE_MODIFIER_MASK, eZTemplate\TYPE_NONE, eZTemplate\TYPE_NUMERIC, eZTemplate\TYPE_NUMERIC_BIT, eZTemplate\TYPE_OPERATOR, eZTemplate\TYPE_OPERATOR_BIT, eZTemplate\TYPE_STRING, eZTemplate\TYPE_STRING_BIT, eZTemplate\TYPE_VARIABLE, eZTemplate\TYPE_VARIABLE_BIT, unescapeCharacters(), variableEndPos(), and whitespaceEndPos().

## ◆ quoteEndPos()

eZTemplateElementParser::quoteEndPos | ( |  | $tpl,
|  | & | $text,
|  |  | $startPosition,
|  |  | $textLength,
|  |  | $quote
| ) |  |

Returns the end position of the quote $quote. If no quote was found the end position is returned.

Definition at line 481 of file eztemplateelementparser.php.

Referenced by parseVariableTag().

## ◆ templateTypeName()

eZTemplateElementParser::templateTypeName | ( |  | $type | ) |

Definition at line 19 of file eztemplateelementparser.php.

References eZTemplate\TYPE_ATTRIBUTE, eZTemplate\TYPE_IDENTIFIER, eZTemplate\TYPE_NUMERIC, eZTemplate\TYPE_STRING, and eZTemplate\TYPE_VARIABLE.

## ◆ unescapeCharacters()

eZTemplateElementParser::unescapeCharacters | ( |  | $string | ) |

Finds any escaped characters and unescapes them if they are one of:

- - A newline
- \r - A carriage return
- \t - A tab
- \' - A single quote
- " - A double quote

If the escaped character is not known it keeps both characters (escape + character).

Returns
  The transformed string without escape characters.

Definition at line 400 of file eztemplateelementparser.php.

Referenced by parseVariableTag().

## ◆ variableEndPos()

eZTemplateElementParser::variableEndPos | ( |  | $tpl,
|  |  | $relatedTemplateName,
|  | & | $text,
|  |  | $startPosition,
|  |  | $textLength,
|  | & | $namespace,
|  | & | $name,
|  | & | $scope
| ) |  |

Returns the end position of the variable.

Definition at line 300 of file eztemplateelementparser.php.

References identifierEndPosition(), eZTemplate\NAMESPACE_SCOPE_GLOBAL, eZTemplate\NAMESPACE_SCOPE_LOCAL, and eZTemplate\NAMESPACE_SCOPE_RELATIVE.

Referenced by parseVariableTag().

## ◆ whitespaceEndPos()

eZTemplateElementParser::whitespaceEndPos | ( |  | $tpl,
|  | & | $text,
|  |  | $currentPosition,
|  |  | $textLength
| ) |  |

Returns the position of the first non-whitespace characters.

Definition at line 559 of file eztemplateelementparser.php.

Referenced by parseVariableTag().

The documentation for this class was generated from the following file:

- eztemplateelementparser.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.