mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-11 09:48:40 +00:00
Implement query route support
This commit is contained in:
parent
f5be923097
commit
9c708c921f
|
|
@ -111,7 +111,7 @@ class Router
|
|||
public function route($request, int $verb = RouteVerb::GET) : array
|
||||
{
|
||||
if ($request instanceof RequestAbstract) {
|
||||
$uri = $request->getUri()->getPath();
|
||||
$uri = $request->getUri()->getRoute();
|
||||
$verb = $request->getRouteVerb();
|
||||
} elseif (is_string($request)) {
|
||||
$uri = $request;
|
||||
|
|
|
|||
|
|
@ -261,6 +261,11 @@ class Http implements UriInterface
|
|||
return $this->path ?? '';
|
||||
}
|
||||
|
||||
public function getRoute() : string
|
||||
{
|
||||
return ($this->path ?? '') . $this->getQuery();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user