File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,8 @@ class Manager
25
25
26
26
private static $ configurations = array ();
27
27
28
+ private static $ configured = array ();
29
+
28
30
public static function initialize ($ url , $ cache = false )
29
31
{
30
32
switch ($ scheme = parse_url ($ url , PHP_URL_SCHEME )) {
@@ -47,6 +49,7 @@ public static function initialize($url, $cache = false)
47
49
48
50
public static function defaults ($ class , $ configuration = array ())
49
51
{
52
+ static ::$ configured [$ class ] = true ;
50
53
if ($ parent = get_parent_class ($ class )) {
51
54
$ configuration = array_replace_recursive (static ::get ($ parent ), $ configuration );
52
55
}
@@ -69,7 +72,9 @@ public static function configure($class, $configuration = array())
69
72
70
73
public static function get ($ class , $ key = null )
71
74
{
72
- static ::defaults ($ class );
75
+ if (!isset (static ::$ configured [$ class ])) {
76
+ static ::defaults ($ class );
77
+ }
73
78
if (!isset (static ::$ configurations [$ class ])) {
74
79
return null ;
75
80
}
You can’t perform that action at this time.
0 commit comments