Heratio Framework API Reference

EscaperShim
in package

Standalone sfOutputEscaper implementation for when Symfony is not loaded.

Provides unescape() — the most commonly used method in AHG templates — and a minimal sfOutputEscaperObjectDecorator that passes through to the wrapped object.

In Symfony mode, the real sfOutputEscaper is loaded first, so these class_exists() guards prevent conflicts.

Table of Contents

Methods

escape()  : mixed
Escape a value — identity function in standalone mode.
register()  : void
Register the shim classes as global sfOutputEscaper / sfOutputEscaperObjectDecorator.
unescape()  : mixed
Unescape a value — returns the raw value.

Methods

escape()

Escape a value — identity function in standalone mode.

public static escape(mixed $escapingMethod, mixed $value) : mixed
Parameters
$escapingMethod : mixed
$value : mixed

register()

Register the shim classes as global sfOutputEscaper / sfOutputEscaperObjectDecorator.

public static register() : void

Only call when Symfony is NOT loaded.

unescape()

Unescape a value — returns the raw value.

public static unescape(mixed $value) : mixed

In Symfony mode, sfOutputEscaper::unescape() unwraps decorator objects. In standalone mode, values are never escaped/wrapped, so we just pass through.

Parameters
$value : mixed

The value to unescape

Return values
mixed

The raw value


        
On this page

Search results