diff --git a/module/misc/control.php b/module/misc/control.php index 548669a263..996d0ec903 100644 --- a/module/misc/control.php +++ b/module/misc/control.php @@ -71,4 +71,16 @@ class misc extends control $this->view->browser = $browser; $this->display(); } + + /** + * Check model extension logic + * + * @access public + * @return void + */ + public function checkExtension() + { + echo $this->misc->hello(); + echo $this->misc->hello2(); + } } diff --git a/module/misc/ext/model/class/test.class.php b/module/misc/ext/model/class/test.class.php new file mode 100644 index 0000000000..ecbf5aed42 --- /dev/null +++ b/module/misc/ext/model/class/test.class.php @@ -0,0 +1,8 @@ +"; + } +} diff --git a/module/misc/ext/model/ext.php b/module/misc/ext/model/ext.php new file mode 100644 index 0000000000..aa2f873704 --- /dev/null +++ b/module/misc/ext/model/ext.php @@ -0,0 +1,6 @@ +loadExtension('test')->hello(); // Load testMisc class from test.class.php in ext/model/class. + return $this->testMisc->hello(); // After loading, can use $this->testMisc to call it. +} diff --git a/module/misc/ext/model/hook/hello.test.php b/module/misc/ext/model/hook/hello.test.php new file mode 100644 index 0000000000..0fa90b6223 --- /dev/null +++ b/module/misc/ext/model/hook/hello.test.php @@ -0,0 +1,2 @@ +"; diff --git a/module/misc/ext/model/hook/hello.test2.php b/module/misc/ext/model/hook/hello.test2.php new file mode 100644 index 0000000000..d8ec452f50 --- /dev/null +++ b/module/misc/ext/model/hook/hello.test2.php @@ -0,0 +1,2 @@ +'; diff --git a/module/misc/ext/model/hook/hello2.start.php b/module/misc/ext/model/hook/hello2.start.php new file mode 100644 index 0000000000..1d1ecce293 --- /dev/null +++ b/module/misc/ext/model/hook/hello2.start.php @@ -0,0 +1,2 @@ +'; diff --git a/module/misc/model.php b/module/misc/model.php index 5989c648aa..8ac651eb2d 100644 --- a/module/misc/model.php +++ b/module/misc/model.php @@ -13,4 +13,8 @@ '; + } }