| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- <?php
- class MockIndexController extends \Tools\AHttpController
- {
- public function run()
- {
- }
- }
- class ControllerModule extends \Tools\AModule
- {
- public $hooked;
- public function __construct()
- {
- $this->installed = false;
- }
- public function install()
- {
- $this->installed = false;
- $this->installHook();
- $route = new \Entity\Cms();
- $route->shurl = "/testController";
- $route->controller = "\MockIndexController";
- $route->order = 0;
- $route->save();
- return true;
- }
- public function installHook()
- {
- $this->registerHook("testHook");
- }
- public function isInstalled()
- {
- return $this->installed;
- }
- public function doAction($ev)
- {
- $this->hooked[] = $ev;
- }
- public function doShortCode($code, $params)
- {
- }
- }
- return new ControllerModule();
|