Esempio n. 1
0
 /**
  * Let the FluxBB server execute the given action and return its response data.
  *
  * @param string $action
  * @param array $parameters
  * @return array
  */
 public function dispatch($action, array $parameters = [])
 {
     return $this->server->dispatch(new Request($action, $parameters))->getData();
 }
Esempio n. 2
0
 /**
  * Resolve the request and return a response.
  *
  * @param \FluxBB\Server\Request $request
  * @return \FluxBB\Server\Response
  * @throws \FluxBB\Server\Exception\Exception
  */
 public function dispatch(Request $request)
 {
     $this->validate($request);
     return $this->next->dispatch($request);
 }
Esempio n. 3
0
 /**
  * Let the FluxBB server execute the given action and return its response data.
  *
  * @param string $action
  * @param array $parameters
  * @return array
  */
 protected function execute($action, array $parameters = [])
 {
     $parameters += $this->input;
     return $this->server->dispatch(new ServerRequest($action, $parameters))->getData();
 }
Esempio n. 4
0
 /**
  * Resolve the request and return a response.
  *
  * @param \FluxBB\Server\Request $request
  * @return \FluxBB\Server\Response
  * @throws \FluxBB\Server\Exception\Exception
  */
 public function dispatch(Request $request)
 {
     $this->authorize($request);
     return $this->next->dispatch($request);
 }