setWorkingDir(PATH_LIB_ACTIONS); if(array_key_exists('action', $params)) { $action = $actionFac->create($params['action']); $action->setUserData($params); $action->execute(); } else { $showInactive = filter_input(INPUT_GET, 'show_inactive', FILTER_VALIDATE_BOOLEAN); echo BridgeList::create($showInactive); } } catch(\Exception $e) { error_log($e); header('Content-Type: text/plain', true, $e->getCode()); die($e->getMessage()); }