Skip to content

Commit

Permalink
integrate_parse_route → integrate_route_parsers
Browse files Browse the repository at this point in the history
Signed-off-by: Jon Stovell <jonstovell@gmail.com>
  • Loading branch information
Sesquipedalian committed Feb 15, 2025
1 parent a3a9094 commit 65fef3f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Sources/QueryString.php
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,9 @@ public static function cleanRequest(): void
}
}

// Let mods add new route parsers to self::$route_parsers.
IntegrationHook::call('integrate_route_parsers');

// Are we using routing (a.k.a. queryless/friendly/pretty URLs)?
$_GET = self::parseRoute($_SERVER['PATH_INFO'] ?? '', $_GET);

Expand Down Expand Up @@ -651,10 +654,6 @@ public static function buildRoute(array|string $params): string
*/
public static function parseRoute(string $path, array $params): array
{
// Give mods a chance to parse the route before we do anything to it.
// This hook can also be used add new route parsers to self::$route_parsers.
IntegrationHook::call('integrate_parse_route', [&$path, &$params]);

if (!str_starts_with($path, '/')) {
return $params;
}
Expand Down

0 comments on commit 65fef3f

Please # to comment.