removed Template::callFunction

This commit is contained in:
Arnaud Le Blanc
2010-12-26 12:47:49 +01:00
committed by Fabien Potencier
parent 9528bac1e4
commit 43ec3036f7
-14
View File
@@ -99,20 +99,6 @@ abstract class Twig_Template implements Twig_TemplateInterface
return $context[$item];
}
protected function callFunction($context, $function, array $arguments = array())
{
if (!$function instanceof Twig_Function) {
throw new Twig_Error_Runtime('Called a non-function', -1, $this->getTemplateName());
}
$object = $function->getObject();
if (!is_object($object)) {
$object = $this->getContext($context, $object);
}
return $this->getAttribute($object, $function->getMethod(), $arguments, Twig_Node_Expression_GetAttr::TYPE_METHOD, false);
}
protected function getAttribute($object, $item, array $arguments = array(), $type = Twig_Node_Expression_GetAttr::TYPE_ANY, $noStrictCheck = false)
{
// array