Dispatcher¶
-
class
OC\AppFramework\Http\
Dispatcher
¶ - Class to dispatch the request to the middleware dispatcher
Source: lib/private/AppFramework/Http/Dispatcher.php#50
Properties¶
Methods¶
-
public
OC\AppFramework\Http\Dispatcher::
__construct
($protocol, $middlewareDispatcher, $reflector, $request, $config, $connection, $logger)¶ Source: Parameters: - $protocol (
OC\AppFramework\Http
) the http protocol with contains all status headers - $middlewareDispatcher (
OC\AppFramework\Middleware\MiddlewareDispatcher
) the dispatcher which
runs the middleware * $reflector (
OC\AppFramework\Utility\ControllerMethodReflector
) the reflector that is used to inject the arguments for the controller * $request (OCP\IRequest
) the incoming request * $config (OCP\IConfig
) * $connection (OC\DB\ConnectionAdapter
) * $logger (Psr\Log\LoggerInterface
)- $protocol (
-
public
OC\AppFramework\Http\Dispatcher::
dispatch
($controller, $methodName)¶ - Handles a request and calls the dispatcher on the controller
Source: Parameters: - $controller (
OCP\AppFramework\Controller
) the controller which will be called - $methodName (string) the method name which will be called on
the controller
Returns: array $array[0] contains a string with the http main header, $array[1] contains headers in the form: $key => value, $array[2] contains the response output
Throws: \Exception
- $controller (