Mercurial > hg > extraction-interface
view classes/basecontroller.php @ 56:95f929d7b318 extractapp
bug fixed: when addTagTitle, removing self-closing tag which causes error in coloring tag
author | Zoe Hong <zhong@mpiwg-berlin.mpg.de> |
---|---|
date | Mon, 30 Mar 2015 15:54:04 +0200 |
parents | 886f43b26ee2 |
children | 97c1e5102a22 |
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); } } } ?>