gyro/core/controller/base/controllerbase.cls.php
Go to the documentation of this file.00001 <?php 00002 Load::directories('controller/base/routes'); 00003 00004 /** 00005 * Base implementation for controllers. To be extended by all controllers 00006 * 00007 * @author Gerd Riesselmann 00008 * @ingroup Controller 00009 */ 00010 class ControllerBase implements IController { 00011 // Return values for action functions 00012 const OK = 'ok'; 00013 const REDIRECT = 'redirect'; 00014 const NOT_FOUND = 'not found'; 00015 const ACCESS_DENIED = 'denied'; 00016 const INTERNAL_ERROR = 'internal error'; 00017 00018 /** 00019 * Return array of Route instances which are handled by this controller 00020 * 00021 * @return array Array of Routes 00022 */ 00023 public function get_routes() { 00024 return array(); 00025 } 00026 00027 /** 00028 * Activates includes before action to reduce cache memory 00029 */ 00030 public function before_action() { 00031 } 00032 00033 /** 00034 * Invoked after setting data and before actions are processed 00035 */ 00036 public function preprocess($page_data) { 00037 } 00038 00039 /** 00040 * Invoked after page content has been created 00041 */ 00042 public function postprocess($page_data) { 00043 } 00044 00045 /** 00046 * Invoked to handle events 00047 */ 00048 public function on_event($name, $params, &$result) { 00049 } 00050 } 00051 ?>