<?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();

