Templating\Helper\CodeHelper (Bundle\FrameworkBundle)
Symfony\Bundle\FrameworkBundle\Templating\Helper\CodeHelper
class CodeHelper extends Helper
CodeHelper.
Methods
setCharset(string $charset) Sets the default charset. | from Helper | |
string | getCharset() Gets the default charset. | from Helper |
__construct(string $fileLinkFormat, string $rootDir, string $charset) Constructor. | ||
string | formatArgsAsText(array $args) Formats an array as a string. | |
abbrClass($class) | ||
abbrMethod($method) | ||
string | formatArgs(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) | ||
string | getName() Returns the canonical name of this helper. |
Details
public setCharset(string $charset)
Sets the default charset.
public string getCharset()
Gets the default charset.
public __construct(string $fileLinkFormat, string $rootDir, string $charset)
Constructor.
public string formatArgsAsText(array $args)
Formats an array as a string.
public abbrClass($class)
public abbrMethod($method)
public string formatArgs(array $args)
Formats an array as a string.
public string fileExcerpt(string $file, int $line)
Returns an excerpt of a code file around the given line number.
public string formatFile(string $file, int $line, string $text = null)
Formats a file path.
public string getFileLink(string $file, int $line)
Returns the link for a given file/line pair.
public formatFileFromText($text)
public string getName()
Returns the canonical name of this helper.
© 2004–2016 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/3.0/Symfony/Bundle/FrameworkBundle/Templating/Helper/CodeHelper.html