update kirby to v5 and add refresh cache panel view button
This commit is contained in:
commit
9a86d41254
466 changed files with 19960 additions and 10497 deletions
|
|
@ -63,7 +63,9 @@ class Router
|
|||
|
||||
foreach ($routes as $props) {
|
||||
if (isset($props['pattern'], $props['action']) === false) {
|
||||
throw new InvalidArgumentException('Invalid route parameters');
|
||||
throw new InvalidArgumentException(
|
||||
message: 'Invalid route parameters'
|
||||
);
|
||||
}
|
||||
|
||||
$patterns = A::wrap($props['pattern']);
|
||||
|
|
@ -163,7 +165,10 @@ class Router
|
|||
array|null $ignore = null
|
||||
): Route {
|
||||
if (isset($this->routes[$method]) === false) {
|
||||
throw new InvalidArgumentException('Invalid routing method: ' . $method, 400);
|
||||
throw new InvalidArgumentException(
|
||||
message: 'Invalid routing method: ' . $method,
|
||||
code: 400
|
||||
);
|
||||
}
|
||||
|
||||
// remove leading and trailing slashes
|
||||
|
|
@ -175,14 +180,17 @@ class Router
|
|||
if ($arguments !== false) {
|
||||
if (
|
||||
empty($ignore) === true ||
|
||||
in_array($route, $ignore) === false
|
||||
in_array($route, $ignore, true) === false
|
||||
) {
|
||||
return $this->route = $route;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
throw new Exception('No route found for path: "' . $path . '" and request method: "' . $method . '"', 404);
|
||||
throw new Exception(
|
||||
code: 404,
|
||||
message: 'No route found for path: "' . $path . '" and request method: "' . $method . '"',
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue