made a small speed optimization

This commit is contained in:
Fabien Potencier
2011-11-23 15:18:40 +01:00
parent 317f6e4725
commit c90b3ec97a
+1 -3
View File
@@ -375,9 +375,7 @@ abstract class Twig_Template implements Twig_TemplateInterface
// object method
if (!isset(self::$cache[$class]['methods'])) {
foreach (get_class_methods($object) as $method) {
self::$cache[$class]['methods'][strtolower($method)] = true;
}
self::$cache[$class]['methods'] = array_change_key_case(array_flip(get_class_methods($object)));
}
$lcItem = strtolower($item);