summaryrefslogtreecommitdiff
path: root/core/helpers/model_cache.php
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-01-14 02:34:39 +0000
committerTim Almdal <tnalmdal@shaw.ca>2009-01-14 02:34:39 +0000
commit7305026fd8a914bd91df9119d995c732894af1b6 (patch)
treeff7f49a5ab0fe419ada9fe110e79eaf703bb7d17 /core/helpers/model_cache.php
parentca36a04f28c1f8fad475617dd36e1c2861fdbaf1 (diff)
make model_cache::get() a static function
Diffstat (limited to 'core/helpers/model_cache.php')
-rw-r--r--core/helpers/model_cache.php3
1 files changed, 1 insertions, 2 deletions
diff --git a/core/helpers/model_cache.php b/core/helpers/model_cache.php
index 7a01393b..0fea8b75 100644
--- a/core/helpers/model_cache.php
+++ b/core/helpers/model_cache.php
@@ -20,7 +20,7 @@
class model_cache_Core {
private static $cache;
- function get($model_name, $id, $field_name="id") {
+ static function get($model_name, $id, $field_name="id") {
if (TEST_MODE || empty(self::$cache->$model_name->$field_name->$id)) {
$model = ORM::factory($model_name)->where($field_name, $id)->find();
if (!$model->loaded) {
@@ -29,7 +29,6 @@ class model_cache_Core {
self::$cache->$model_name->$field_name->$id = $model;
}
-
return self::$cache->$model_name->$field_name->$id;
}
}