Update base.php
This commit is contained in:
parent
231968238b
commit
939e541787
|
@ -129,6 +129,28 @@ if(!function_exists("loadRoute")) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// load vendor file
|
||||||
|
if(!function_exists("loadVendor")) {
|
||||||
|
function loadVendor($usenames, $data=array()) {
|
||||||
|
$flag = true;
|
||||||
|
|
||||||
|
if(!is_array($flag)) {
|
||||||
|
return !$flag;
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach($usenames as $name) {
|
||||||
|
$vendorfile = './vendor/' . $name . '.php';
|
||||||
|
if(file_exists($vendorfile)) {
|
||||||
|
register_loaded("vendor", $name);
|
||||||
|
$flag = $flag && !include_isolate($vendorfile, $data);
|
||||||
|
} else {
|
||||||
|
set_error("Vendor " . $name . "dose not exists");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return !$flag;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(!function_exists("array_key_empty")) {
|
if(!function_exists("array_key_empty")) {
|
||||||
function array_key_empty($key, $array) {
|
function array_key_empty($key, $array) {
|
||||||
$empty = true;
|
$empty = true;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user