use wcf\system\endpoint\event\ControllerCollecting;
use wcf\system\endpoint\GetRequest;
use wcf\system\endpoint\IController;
-use wcf\system\endpoint\Parameters;
use wcf\system\endpoint\PostRequest;
-use wcf\system\endpoint\ApiController;
use wcf\system\endpoint\RequestType;
use wcf\system\event\EventHandler;
use wcf\system\request\RouteHandler;
+++ /dev/null
-<?php
-
-namespace wcf\system\endpoint;
-
-#[\Attribute(\Attribute::TARGET_PARAMETER)]
-final class Parameters
-{
- public function __construct(
- public readonly string $arrayShape = '',
- ) {
- }
-}
+++ /dev/null
-<?php
-
-namespace wcf\system\endpoint\error;
-
-enum ControllerError: string
-{
- case ParameterTypeComplex = 'parameter_type_complex';
- case ParameterTypeUnknown = 'parameter_type_unknown';
- case ParameterWithoutType = 'parameter_without_type';
- case ParameterNotInUri = 'parameter_not_in_uri';
-}
+++ /dev/null
-<?php
-
-namespace wcf\system\endpoint\error;
-
-enum RouteParameterError: string
-{
- case ExpectedPositiveInteger = 'expected_positive_integer';
- case ExpectedNonEmptyString = 'expected_non_empty_string';
-}
+++ /dev/null
-<?php
-
-namespace wcf\system\endpoint\exception;
-
-use wcf\system\endpoint\error\ControllerError;
-
-class ControllerMalformed extends \Exception
-{
- public function __construct(
- public readonly ControllerError $type,
- public readonly \ReflectionParameter $parameter,
- ) {
-
- parent::__construct(
- \sprintf(
- 'The parameter "%s" for %s::%s could not be processed.',
- $parameter->name,
- $parameter->getDeclaringClass()->name,
- $parameter->getDeclaringFunction()->name,
- ),
- );
- }
-}
+++ /dev/null
-<?php
-
-namespace wcf\system\endpoint\exception;
-
-use wcf\system\endpoint\error\RouteParameterError;
-
-final class RouteParameterMismatch extends \Exception
-{
- public function __construct(
- public readonly RouteParameterError $type,
- public readonly string $name,
- ) {
- parent::__construct(
- \sprintf('The parameter "%s" is malformed', $name),
- );
- }
-}