Example #1
0
 /**
  * @return \Psr\Http\Message\ResponseInterface|\Zend\Diactoros\Response
  */
 public function handle()
 {
     $handler = new WatermarkSetHandler($this->container, $this->settings);
     $response = $handler->toResponse($this->request);
     return $response->generateHttpResponse();
 }
Example #2
0
 /**
  * Api handler.
  *
  * @param \Notadd\Foundation\Attachment\Handlers\WatermarkSetHandler $handler
  *
  * @return \Notadd\Foundation\Passport\Responses\ApiResponse
  * @throws \Exception
  */
 public function handle(WatermarkSetHandler $handler)
 {
     $response = $handler->toResponse();
     return $response->generateHttpResponse();
 }