/** * Must echo the page response * * @since ADD MVC 0.6 */ public function execute() { # ADD MVC 0.5 backward support if (method_exists($this, 'page')) { return $this->page(); } # Set Content Type $this->content_type($this->content_type); $this->set_mode(); add::$handle_shutdown = false; $this->process_data(isset($this->common_gpc) ? ctrl_tpl_page::recursive_compact($this->common_gpc) : array()); $this->print_response($this->data); }
/** * process_mode function * Processes any GPC requests * * @since ADD MVC 0.6 * */ public function process_mode() { $mode = $this->mode; if ($mode) { $method_name = "process_mode_{$mode}"; if (method_exists($this, $method_name)) { $gpc_key_var = "mode_gpc_{$mode}"; if (isset($this->{$gpc_key_var})) { $compact_array = ctrl_tpl_page::recursive_compact($this->{$gpc_key_var}); } return $this->{$method_name}($compact_array); } } return false; }