public function execute() { $method = 'execute' . ucfirst($this->action); if (!is_callable(array($this, $method))) { throw new \RuntimeException('The action "' . $this->action . '" is not defined for this module'); } $this->AddCommonVarsToPage(); $br = new UC\Breadcrumb($this->app()); //Load controller method $time_log_type = Enums\ResourceKeys\GlobalAppKeys::log_controller_method_request; Core\Utility\TimeLogger::StartLog($this->app(), $time_log_type); $result = $this->{$method}($this->app->HttpRequest()); Core\Utility\TimeLogger::EndLog($this->app(), $time_log_type); if ($result !== NULL) { $result["br"] = $br->Build(); echo \Library\HttpResponse::encodeJson($result); } else { $this->page->addVar("br", $br->Build()); } }