CodeExtension
class CodeExtension extends Twig_Extension
Twig extension relate to PHP code and used by the profiler and the default exception templates.
Methods
__construct(string $fileLinkFormat, string $rootDir, string $charset)
Constructor.
getFilters()
{@inheritdoc}
abbrClass($class)
No description
abbrMethod($method)
No description
string
formatArgs(array $args)
Formats an array as a string.
string
formatArgsAsText(array $args)
Formats an array as a string.
string
fileExcerpt(string $file, int $line)
Returns an excerpt of a code file around the given line number.
string
formatFile(string $file, int $line, string $text = null)
Formats a file path.
string
getFileLink(string $file, int $line)
Returns the link for a given file/line pair.
formatFileFromText($text)
No description
getName()
{@inheritdoc}
Details
at line line 32
__construct(string $fileLinkFormat, string $rootDir, string $charset)
Constructor.
at line line 42
getFilters()
{@inheritdoc}
at line line 56
abbrClass($class)
at line line 64
abbrMethod($method)
at line line 85
string
formatArgs(array $args)
Formats an array as a string.
at line line 120
string
formatArgsAsText(array $args)
Formats an array as a string.
at line line 133
string
fileExcerpt(string $file, int $line)
Returns an excerpt of a code file around the given line number.
at line line 161
string
formatFile(string $file, int $line, string $text = null)
Formats a file path.
at line line 193
string
getFileLink(string $file, int $line)
Returns the link for a given file/line pair.
at line line 202
formatFileFromText($text)
at line line 212
getName()
{@inheritdoc}