Extract second argument name (handler ref for route registrations). Normalize a string-form route handler to a resolvable handler name. * 'showUsers' → showUsers * 'UserController@show' → show (Laravel "Controller@method") * The method segment after '@' is the resolvable function/method name. */
| 2993 | * 'UserController@show' → show (Laravel "Controller@method") |
| 2994 | * The method segment after '@' is the resolvable function/method name. */ |
| 2995 | static const char *normalize_string_handler(CBMArena *a, const char *raw) { |
| 2996 | const char *unq = strip_quotes(a, raw); |
| 2997 | if (!unq || !unq[0]) { |
| 2998 | return NULL; |
| 2999 | } |
| 3000 | const char *at = strchr(unq, '@'); |
| 3001 | if (at && at[1]) { |
| 3002 | return cbm_arena_strdup(a, at + 1); |
| 3003 | } |
| 3004 | return unq; |
| 3005 | } |
| 3006 | |
| 3007 | /* True for a PHP class/namespace name: identifier segments joined by '\'. */ |
| 3008 | static bool php_is_class_path(const char *s) { |
no test coverage detected