projects
/
web/konrad/twig.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
317f6e4
)
made a small speed optimization
author
Fabien Potencier
<fabien.potencier@gmail.com>
Wed, 23 Nov 2011 14:18:40 +0000 (15:18 +0100)
committer
Fabien Potencier
<fabien.potencier@gmail.com>
Wed, 23 Nov 2011 14:18:40 +0000 (15:18 +0100)
lib/Twig/Template.php
patch
|
blob
|
history
diff --git
a/lib/Twig/Template.php
b/lib/Twig/Template.php
index
0e20512
..
c4dfedf
100644
(file)
--- a/
lib/Twig/Template.php
+++ b/
lib/Twig/Template.php
@@
-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);