eZPublish  4.7
eZTemplateElementParser Class Reference

The class eZTemplateElementParser does. More...

Public Member Functions

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

Static Public Member Functions

static instance ()
 Returns a shared instance of the eZTemplateElementParser class. More...
 

Detailed Description

The class eZTemplateElementParser does.

Member Function Documentation

eZTemplateElementParser::eZTemplateElementParser ( )

Constructor

Referenced by instance().

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

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

Referenced by parseVariableTag(), and variableEndPos().

static eZTemplateElementParser::instance ( )
static

Returns a shared instance of the eZTemplateElementParser class.

Returns
eZTemplateElementParser

Referenced by eZTemplateMultiPassParser\eZTemplateMultiPassParser().

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

Returns the position of the first non-whitespace characters.

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.

Referenced by 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.

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.

Referenced by parseVariableTag().

eZTemplateElementParser::templateTypeName (   $type)
eZTemplateElementParser::unescapeCharacters (   $string)

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


  • - A newline
  • - A carriage return
  • - 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.

Referenced by parseVariableTag().

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

Returns the end position of the variable.

Referenced by parseVariableTag().

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

Returns the position of the first non-whitespace characters.

Referenced by parseVariableTag().


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