Example #1
0
 /**
  * Api handler.
  *
  * @return \Psr\Http\Message\ResponseInterface|\Zend\Diactoros\Response
  */
 public function handle(SetHandler $handler)
 {
     $response = $handler->toResponse();
     return $response->generateHttpResponse();
 }
Example #2
0
 /**
  * @param \Notadd\Foundation\Setting\Contracts\SettingsRepository $settings
  *
  * @return \Psr\Http\Message\ResponseInterface|\Zend\Diactoros\Response
  */
 public function handle(SettingsRepository $settings)
 {
     $handler = new SetHandler($this->container, $settings);
     $response = $handler->toResponse($this->request);
     return $response->generateHttpResponse();
 }