summaryrefslogtreecommitdiff
path: root/app/Core
diff options
context:
space:
mode:
Diffstat (limited to 'app/Core')
-rw-r--r--app/Core/Tool.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/Core/Tool.php b/app/Core/Tool.php
index ade99cad..1a2e9904 100644
--- a/app/Core/Tool.php
+++ b/app/Core/Tool.php
@@ -31,4 +31,11 @@ class Tool
fclose($fp);
}
}
+
+ public static function loadModel(Registry $registry, $name)
+ {
+ $class = '\Model\\'.ucfirst($name);
+ $registry->$name = new $class($registry);
+ return $registry->shared($name);
+ }
}