Mercurial > hg > extraction-interface
view develop/classes/basecontroller.php @ 16:fb948097de39
fix bug: Edittaglist is working on Firefox.
fix bug: name of regex used to show with strange <span id="transmark"></span> showing only on FF but not Saf. Change it to use "document.getElementById(id).textContent to get the pure text string.
author | Zoe Hong <zhong@mpiwg-berlin.mpg.de> |
---|---|
date | Fri, 20 Feb 2015 16:39:08 +0100 |
parents | ac77748bb813 |
children |
line wrap: on
line source
<?php // an instance of the BaseController class can't be created directly; // it can only be extended/inherited by other classes abstract class BaseController { protected $urlvalues; protected $action; public function __construct($action, $urlvalues, $postdata) { $this->action = $action; $this->urlvalues = $urlvalues; $this->postdata = $postdata; } public function ExecuteAction() { return $this->{$this->action}(); } protected function ReturnView($viewmodel, $fullview) { $viewloc = 'views/' . get_class($this) . '/' . $this->action . '.php'; if ($fullview) { require('views/maintemplate.php'); require($viewloc); } else { require($viewloc); } } protected function ReturnView_localtest($viewmodel, $fullview) { $viewloc = 'views/' . get_class($this) . '/' . $this->action . '.php'; if ($fullview) { require('views/maintemplate_local.php'); require($viewloc); } else { require($viewloc); } } } ?>