Пример #1
0
 /**
  * Creates a new error
  * @param string $statusCode HTTP status code applicable to this problem
  * @param string $code Application-specific error code
  * @param string $title A short, human-readable summary of the problem that
  * SHOULD NOT change from occurrence to occurrence of the problem, except
  * for purposes of localization.
  * @param string $detail A human-readable explanation specific to this
  * occurrence of the problem.
  * @return JsonApiError
  */
 public function createError($statusCode = null, $code = null, $title = null, $detail = null)
 {
     $error = new JsonApiError();
     $error->setStatusCode($statusCode);
     $error->setCode($code);
     $error->setTitle($title);
     $error->setDetail($detail);
     return $error;
 }