Class Twig_FileExtensionEscapingStrategy

InheritanceTwig_FileExtensionEscapingStrategy

Default autoescaping strategy based on file names.

This strategy sets the HTML as the default autoescaping strategy, but changes it based on the filename.

Note that there is no runtime performance impact as the default autoescaping strategy is set at compilation time.

Public Methods

Hide inherited methods

MethodDescriptionDefined By
guess() Guesses the best autoescaping strategy based on the file name. Twig_FileExtensionEscapingStrategy

Method Details

guess() public static method

Guesses the best autoescaping strategy based on the file name.

public static string|false guess ( $filename )
$filename string

The template file name

return string|false

The escaping strategy name to use or false to disable