Update base.php

This commit is contained in:
Namhyeon Go 2018-06-11 15:47:22 +09:00 committed by GitHub
parent 345b71f693
commit 585a09b7e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -64,6 +64,17 @@ if(!function_exists("renderView")) {
}
}
// load view by rules
if(!function_exists("renderViewByRules")) {
function renderViewByRules($rules, $data=array()) {
foreach($rules as $k=>$v) {
if(in_array($k, get_routes())) {
renderView($v, $data);
}
}
}
}
// load system module
if(!function_exists("loadModule")) {
function loadModule($name) {