comparison classes/basecontroller.php @ 81:f1f849d31272 extractapp

book_id as string
author Zoe Hong <zhong@mpiwg-berlin.mpg.de>
date Thu, 23 Apr 2015 14:58:27 +0200
parents 97c1e5102a22
children 7d6a107c37da
comparison
equal deleted inserted replaced
80:c15f53afd7a5 81:f1f849d31272
1 <?php 1 <?php
2 /* basecontroller.php
3 * This file is part of Extraction-interface.
4 *
5 * Extraction-interface is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * Extraction-interface is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with Extraction-interface. If not, see <http://www.gnu.org/licenses/>.
17 */
18
2 /** 19 /**
3 * An instance of the BaseController class can't be created directly. 20 * A controller can send commands to the model to process or update the model's state.
4 * It can only be extended/inherited by other classes. 21 * It can also pass the commands or data (from model) to the associated view to change the view's presentation.
22 *
23 * An instance of the BaseController class can't be created directly.
24 * It can only be extended/inherited by other classes.
25 * For example in controllers/ folder, Extractapp is extended from the BaseController.
26 * An instance of Extractapp can be created directly.
27 *
5 */ 28 */
6 29
7 abstract class BaseController { 30 abstract class BaseController {
8 31
9 protected $urlvalues; 32 protected $urlvalues;
21 44
22 protected function ReturnView($viewmodel, $fullview) { 45 protected function ReturnView($viewmodel, $fullview) {
23 /** 46 /**
24 * Return the corresponding view in the views folder. 47 * Return the corresponding view in the views folder.
25 * We use the same class name as the folder's name and action name as the file's name in the folder hierarchy. 48 * We use the same class name as the folder's name and action name as the file's name in the folder hierarchy.
26 * In this design, we can require the corresponding views php code by defining controller and action in url. 49 * In this design, we can query the corresponding views php code by defining controller and action in url.
27 * 50 *
28 * If you also require the maintemplate.php, which now only contains scripts that need to be inclued, set $fullview to be true; 51 * If you also require the maintemplate.php, which now only contains scripts that need to be inclued, set $fullview to be true;
29 * otherwise, the maintemplate.php will not be applied. 52 * otherwise, the maintemplate.php will not be applied.
30 */ 53 */
31 54