Class Twig_Extension_Escaper

InheritanceTwig_Extension_Escaper » Twig_Extension
ImplementsTwig_ExtensionInterface

Protected Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$defaultStrategy Twig_Extension_Escaper

Public Methods

Hide inherited methods

MethodDescriptionDefined By
__construct() Constructor. Twig_Extension_Escaper
getDefaultStrategy() Gets the default strategy to use when not defined by the user. Twig_Extension_Escaper
getFilters() Twig_Extension_Escaper
getFunctions() {@inheritdoc} Twig_Extension
getGlobals() {@inheritdoc} Twig_Extension
getName() Twig_Extension_Escaper
getNodeVisitors() Twig_Extension_Escaper
getOperators() {@inheritdoc} Twig_Extension
getTests() {@inheritdoc} Twig_Extension
getTokenParsers() Twig_Extension_Escaper
initRuntime() {@inheritdoc} Twig_Extension
setDefaultStrategy() Sets the default strategy to use when not defined by the user. Twig_Extension_Escaper

Property Details

$defaultStrategy protected property
protected $defaultStrategy null

Method Details

__construct() public method

Constructor.

See also setDefaultStrategy().

public void __construct ( $defaultStrategy 'html' )
$defaultStrategy string|false|callable

An escaping strategy

getDefaultStrategy() public method

Gets the default strategy to use when not defined by the user.

public string|false getDefaultStrategy ( $filename )
$filename string

The template "filename"

return string|false

The default strategy to use for the template

getFilters() public method

public void getFilters ( )
getName() public method

public void getName ( )
getNodeVisitors() public method

public void getNodeVisitors ( )
getTokenParsers() public method

public void getTokenParsers ( )
setDefaultStrategy() public method

Sets the default strategy to use when not defined by the user.

The strategy can be a valid PHP callback that takes the template "filename" as an argument and returns the strategy to use.

public void setDefaultStrategy ( $defaultStrategy )
$defaultStrategy string|false|callable

An escaping strategy