40 ),
'{'.preg_quote($ext).
'$}' 53 public function collect(Traversable $iterator)
55 $this->deprecations = array();
57 set_error_handler(array($this,
'errorHandler'));
59 foreach ($iterator as
$name => $contents) {
61 $this->twig->parse($this->twig->tokenize(
new Twig_Source($contents,
$name)));
67 restore_error_handler();
70 $this->deprecations = array();
80 if (E_USER_DEPRECATED ===
$type) {
81 $this->deprecations[] = $msg;
86 class_alias(
'Twig_Util_DeprecationCollector',
'Twig\Util\DeprecationCollector',
false);
__construct(Twig_Environment $twig)
errorHandler($type, $msg)
Exception thrown when a syntax error occurs during lexing or parsing of a template.
collectDir($dir, $ext='.twig')
Returns deprecations for templates contained in a directory.
Holds information about a non-compiled Twig template.
Stores the Twig configuration.
collect(Traversable $iterator)
Returns deprecations for passed templates.