public static function callAction($controller) { $response = array(); try { if (isset($_GET['action']) && !empty($_GET['action'])) { if (method_exists($controller, 'action_' . $_GET['action'])) { $response = call_user_func(array($controller, 'action_' . $_GET['action'])); } } if (method_exists($controller, 'action_main') && !$controller->stopPropagation()) { $response = array_merge($response, call_user_func(array($controller, 'action_main'))); } } catch (Exception $e) { ErrorLogHandling::getException($e->getMessage()); } return $response; }
public static function callAction($controller) { $response = array(); try { if (isset($_GET['action']) && !empty($_GET['action'])) { if (method_exists($controller, 'action_' . $_GET['action'])) { $response = call_user_func(array($controller, 'action_' . $_GET['action'])); } } if (method_exists($controller, 'action_main') && !$controller->stopPropagation()) { $response = array_merge($response, call_user_func(array($controller, 'action_main'))); } } catch (Exception $e) { ErrorLogHandling::register("Exception is occured." . $e->getMessage() . " USER ID:" . SessionService::getInstance()->get('userId') . " DATE: " . date("F j, Y, g:i a")); ErrorLogHandling::getException($e->getMessage()); } return $response; }