/**
  *
  * Builds a Response for PayloadStatus::NOT_VALID.
  *
  */
 protected function notValid()
 {
     $this->response = $this->response->withStatus(422);
     $this->jsonBody(['input' => $this->payload->getInput(), 'output' => $this->payload->getOutput(), 'messages' => $this->payload->getMessages()]);
 }
Esempio n. 2
0
 /**
  * Failure
  *
  * @return mixed
  *
  * @access protected
  */
 protected function failure()
 {
     $this->response = $this->response->withStatus(400);
     $this->render($this->viewScript, ['failed' => true, 'input' => $this->payload->getInput(), 'error' => $this->payload->getOutput()]);
 }