Mercurial > hg > extraction-interface
view develop/classes/basecontroller.php @ 11:3d6fba07bfbd
implemented for topic tag. tagging with topic tag (main tag) indicating each row when export to html.
author | Zoe Hong <zhong@mpiwg-berlin.mpg.de> |
---|---|
date | Wed, 11 Feb 2015 12:33:59 +0100 |
parents | 63e08b98032f |
children | ac77748bb813 |
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'); } else { require($viewloc); } } } ?>