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:

lib/private/AppFramework/Http/Dispatcher.php#84

Parameters:

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)

public OC\AppFramework\Http\Dispatcher::dispatch($controller, $methodName)
Handles a request and calls the dispatcher on the controller
Source:

lib/private/AppFramework/Http/Dispatcher.php#111

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