Skip to content

Commit 433c814

Browse files
committed
Update upload/system/engine/loader.php
1 parent 9b7b640 commit 433c814

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

upload/system/engine/loader.php

+18-2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@ public function __construct($registry) {
66
$this->registry = $registry;
77
}
88

9+
public function __get($key) {
10+
return $this->registry->get($key);
11+
}
12+
13+
public function __set($key, $value) {
14+
$this->registry->set($key, $value);
15+
}
16+
917
public function library($library) {
1018
$file = DIR_SYSTEM . 'library/' . $library . '.php';
1119

@@ -32,7 +40,7 @@ public function model($model) {
3240
$file = DIR_APPLICATION . 'model/' . $model . '.php';
3341
$class = 'Model' . preg_replace('/[^a-zA-Z0-9]/', '', $model);
3442

35-
if (file_exists($file)) {
43+
if (file_exists($file)) {
3644
include_once($file);
3745

3846
$this->registry->set('model_' . str_replace('/', '_', $model), new $class($this->registry));
@@ -55,5 +63,13 @@ public function database($driver, $hostname, $username, $password, $database) {
5563
exit();
5664
}
5765
}
66+
67+
public function config($config) {
68+
$this->config->load($config);
69+
}
70+
71+
public function language($language) {
72+
return $this->language->load($language);
73+
}
5874
}
59-
?>
75+
?>

0 commit comments

Comments
 (0)