KumbiaPHP beta2-dev
Framework PHP en español
controller.php
Ir a la documentación de este archivo.
00001 <?php
00022 class Controller 
00023 {
00029         public $module_name;
00035         public $controller_name;
00041         public $action_name;
00048         public $limit_params = TRUE;
00054         public $scaffold;
00063         public function __construct($module, $controller, $action, $parameters) {
00064                 //TODO: enviar un objeto
00065                 $this->module_name = $module;
00066                 $this->controller_name = $controller;
00067                 $this->parameters = $parameters;
00068                 $this->action_name = $action;
00069         }       
00070         
00076     protected function before_filter()
00077     {
00078     }
00084     protected function after_filter()
00085     {
00086     }
00092     protected function initialize()
00093     {
00094     }
00100     protected function finalize()
00101     {
00102     }
00103 
00110     final public function k_callback($init = FALSE)
00111     { 
00112         if($init){
00113                         if($this->initialize() !== FALSE){
00114                                 return $this->before_filter();
00115                         }
00116                         return FALSE;
00117                 }
00118         
00119                 $this->after_filter();
00120                 $this->finalize();
00121     }
00122 }
 Todo Estructuras de Datos Namespaces Archivos Funciones Variables Enumeraciones