From 453afc0b31318d65fdd6f5d448a8eba75ece9c48 Mon Sep 17 00:00:00 2001 From: Abel Hoogeveen Date: Mon, 16 Mar 2015 12:38:46 +0100 Subject: [PATCH] Started working on new Abstract for models which allows the use of multiple types of models --- Core/Mods/databasemodel/moduleInfo.php | 2 ++ Core/System/class.abstract.model.php | 42 ++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 Core/System/class.abstract.model.php diff --git a/Core/Mods/databasemodel/moduleInfo.php b/Core/Mods/databasemodel/moduleInfo.php index 1557930..e705a41 100644 --- a/Core/Mods/databasemodel/moduleInfo.php +++ b/Core/Mods/databasemodel/moduleInfo.php @@ -5,6 +5,8 @@ return array( 'module_file' => 'class.model.php', 'module_name' => 'databasemodel', + 'abstract' => true, + 'name' => 'DatabaseModel', 'description' => 'Abstract type for easy database queries', 'author' => 'TechFuze', diff --git a/Core/System/class.abstract.model.php b/Core/System/class.abstract.model.php new file mode 100644 index 0000000..daec1f2 --- /dev/null +++ b/Core/System/class.abstract.model.php @@ -0,0 +1,42 @@ +$name; + } + + public function __set($name, $value) { + $parentClass->$name = $value; + } + + public function __call($name, $params) { + return call_user_func_array(array($this->parentClass, $name), $params); + } +} \ No newline at end of file