@@ 345-361 (lines=17) @@ | ||
342 | * |
|
343 | * @return $this |
|
344 | */ |
|
345 | public function addQueryParameterError( |
|
346 | $name, |
|
347 | $title, |
|
348 | $detail = null, |
|
349 | $status = null, |
|
350 | $idx = null, |
|
351 | LinkInterface $aboutLink = null, |
|
352 | $code = null, |
|
353 | $meta = null |
|
354 | ) { |
|
355 | $source = [Error::SOURCE_PARAMETER => $name]; |
|
356 | $error = new Error($idx, $aboutLink, $status, $code, $title, $detail, $source, $meta); |
|
357 | ||
358 | $this->add($error); |
|
359 | ||
360 | return $this; |
|
361 | } |
|
362 | ||
363 | /** @noinspection PhpTooManyParametersInspection |
|
364 | * @param string $title |
|
@@ 375-391 (lines=17) @@ | ||
372 | * |
|
373 | * @return $this |
|
374 | */ |
|
375 | protected function addResourceError( |
|
376 | $title, |
|
377 | $pointer, |
|
378 | $detail = null, |
|
379 | $status = null, |
|
380 | $idx = null, |
|
381 | LinkInterface $aboutLink = null, |
|
382 | $code = null, |
|
383 | $meta = null |
|
384 | ) { |
|
385 | $source = [Error::SOURCE_POINTER => $pointer]; |
|
386 | $error = new Error($idx, $aboutLink, $status, $code, $title, $detail, $source, $meta); |
|
387 | ||
388 | $this->add($error); |
|
389 | ||
390 | return $this; |
|
391 | } |
|
392 | ||
393 | /** |
|
394 | * @return string |