public function addExtension(Twig_ExtensionInterface $extension)
{
$this->extensions[$extension->getName()] = $extension;
+ $this->parsers = null;
+ $this->visitors = null;
+ $this->filters = null;
+ $this->tests = null;
+ $this->functions = null;
+ $this->globals = null;
}
/**
public function removeExtension($name)
{
unset($this->extensions[$name]);
+ $this->parsers = null;
+ $this->visitors = null;
+ $this->filters = null;
+ $this->tests = null;
+ $this->functions = null;
+ $this->globals = null;
}
/**
public function addTokenParser(Twig_TokenParserInterface $parser)
{
$this->staging['token_parsers'][] = $parser;
+ $this->parsers = null;
}
/**
public function addNodeVisitor(Twig_NodeVisitorInterface $visitor)
{
$this->staging['visitors'][] = $visitor;
+ $this->visitors = null;
}
/**
public function addFilter($name, Twig_FilterInterface $filter)
{
$this->staging['filters'][$name] = $filter;
+ $this->filters = null;
}
/**
public function addTest($name, Twig_TestInterface $test)
{
$this->staging['tests'][$name] = $test;
+ $this->tests = null;
}
/**
public function addFunction($name, Twig_FunctionInterface $function)
{
$this->staging['functions'][$name] = $function;
+ $this->functions = null;
}
/**