class NamespaceDetectionTemplateProcessor extends NamespaceDetectionTemplateProcessor (View source)

Note: this detects Namespace declarations AND takes care of CDATA because the class in TYPO3Fluid does so as well.

Compared to TYPO3Fluid that just removes all CDATA sections from the template before parsing, this pre processor finds CDATA and base65 encodes those areas of the template and surrounds that with a call to the Base64DecodeViewHelper which results in the the CDATA section to be present in the final output without any changes from fluid.

Properties

static $EXTENDED_SPLIT_PATTERN_TEMPLATE_DYNAMICTAGS

Extension of the default pattern for dynamic tags including namespaces with uppercase letters.

Methods

string
preProcessSource(string $templateSource)

Pre-process the template source before it is returned to the TemplateParser or passed to the next TemplateProcessorInterface instance.

mixed
protectCDataSectionsFromParser(string $templateSource)

Encodes areas enclosed in CDATA to prevent further parsing by the Fluid engine.

void
throwExceptionsForUnhandledNamespaces(string $templateSource)

Throw an UnknownNamespaceException for any unknown and not ignored namespace inside the template string.

Details

string preProcessSource(string $templateSource)

Pre-process the template source before it is returned to the TemplateParser or passed to the next TemplateProcessorInterface instance.

Parameters

string $templateSource

Return Value

string

mixed protectCDataSectionsFromParser(string $templateSource)

Encodes areas enclosed in CDATA to prevent further parsing by the Fluid engine.

CDATA sections will appear as they are in the final rendered result.

Parameters

string $templateSource

Return Value

mixed

void throwExceptionsForUnhandledNamespaces(string $templateSource)

Throw an UnknownNamespaceException for any unknown and not ignored namespace inside the template string.

Parameters

string $templateSource

Return Value

void