Beispiel #1
0
 /**
  * Tries to create an {@link Operation} instance from the specified request. The operation
  * is then executed and its response returned.
  *
  * If an operation could be created from the request, the `operation` property of the request's
  * context is set to that operation.
  *
  * For forwarded operation, successful responses are not returned unless the request is an XHR
  * or the response has a location.
  *
  * @inheritdoc
  */
 public function __invoke(Request $request)
 {
     $request->context->operation = $operation = Operation::from($request);
     if (!$operation) {
         return null;
     }
     return $this->respond($operation, $request);
 }