File tree 2 files changed +6
-5
lines changed
2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 2
2
date: 2016-10-30
3
3
changes:
4
4
- Fix issue with override ` make:addon ` and ` make:stream commands ` , currently realized using singleton.
5
- -
5
+ - Fix issue # 23
6
6
7
7
1.1.1
8
8
date: 2016-10-12
Original file line number Diff line number Diff line change @@ -30,14 +30,15 @@ function _render($template, $context)
30
30
* Shorthand for config helper
31
31
*
32
32
* @param string $path, config path
33
- * @param Addon addon, optional addon
33
+ * @param Addon $addon, optional addon
34
+ * @param Addon $default, optional default value if not found
34
35
* @return *,
35
36
*/
36
37
37
38
if (!function_exists ('_config ' )) {
38
- function _config ($ path , $ addon = null )
39
+ function _config ($ path , $ addon = null , $ default = null )
39
40
{
40
- return config (($ addon ? $ addon ->getNamespace () : 'websemantics.extension.builder ' ) . ":: $ path " );
41
+ return config (($ addon ? $ addon ->getNamespace () : 'websemantics.extension.builder ' ) . ":: $ path " )?: $ default ;
41
42
}
42
43
}
43
44
@@ -94,7 +95,7 @@ function ($value) {
94
95
95
96
if (!function_exists ('_getNamespaces ' )) {
96
97
function _getNamespaces ($ module ){
97
- $ namespaces = _config ('builder.namespaces ' , $ module );
98
+ $ namespaces = _config ('builder.namespaces ' , $ module, [] );
98
99
return ($ namespaces !== array_values ($ namespaces )) ? array_keys ($ namespaces ) : $ namespaces ;
99
100
}
100
101
}
You can’t perform that action at this time.
0 commit comments