KumbiaPHP  beta2
Framework PHP
 Todo Estructuras de Datos Namespaces Archivos Funciones Variables Páginas
controller.php
Ir a la documentación de este archivo.
1 <?php
28 {
29 
35  public $module_name;
47  public $action_name;
53  public $parameters;
60  public $limit_params = TRUE;
66  public $scaffold;
67 
76  public function __construct($module, $controller, $action, $parameters)
77  {
78  //TODO: enviar un objeto
79  $this->module_name = $module;
80  $this->controller_name = $controller;
81  $this->parameters = $parameters;
82  $this->action_name = $action;
83  }
84 
90  protected function before_filter()
91  {
92 
93  }
94 
100  protected function after_filter()
101  {
102 
103  }
104 
110  protected function initialize()
111  {
112 
113  }
114 
120  protected function finalize()
121  {
122 
123  }
124 
131  final public function k_callback($init = FALSE)
132  {
133  if ($init) {
134  if ($this->initialize() !== FALSE) {
135  return $this->before_filter();
136  }
137  return FALSE;
138  }
139 
140  $this->after_filter();
141  $this->finalize();
142  }
143 
144 }