1 ) { $err .= $argv[1]; } $exists = bootstrap\registry::get('di')->exists('log'); if ($exists) { $log = bootstrap\registry::get('di')->get_service('log', ['CLI_404s']); $log->write($err); } echo $err; exit(1); } /** * Displays 404 Page not Found */ public static function error404(): void { if (console_app::is_cli()) { self::error404_cli(); } else { $use_api = misc::is_api(); } if ($use_api === true) { self::api_method_not_found(); } // Show 404, Page Not Found Error Page! if (bootstrap\requires::secure_include('404_page.php', bootstrap\UseDir::ONERROR) === false) { $loaded = bootstrap\requires::secure_include('views/on_error/404_page.php', bootstrap\UseDir::FRAMEWORK); if ($loaded === false) { echo "

404 Page Not Found!

"; } } exit(1); } /** * API Method was not found do API 400 Error */ private static function api_method_not_found(): void { $status = 400; // Bad Request $bad_request = api::BAD_REQUEST; api::error(array('response' => $bad_request, 'code' => $status, 'reason' => 'Command not found')); } }