| @@ 352-368 (lines=17) @@ | ||
| 349 | * |
|
| 350 | * @return $this |
|
| 351 | */ |
|
| 352 | public function addQueryParameterError( |
|
| 353 | $name, |
|
| 354 | $title, |
|
| 355 | $detail = null, |
|
| 356 | $status = null, |
|
| 357 | $idx = null, |
|
| 358 | LinkInterface $aboutLink = null, |
|
| 359 | $code = null, |
|
| 360 | $meta = null |
|
| 361 | ) { |
|
| 362 | $source = [Error::SOURCE_PARAMETER => $name]; |
|
| 363 | $error = new Error($idx, $aboutLink, $status, $code, $title, $detail, $source, $meta); |
|
| 364 | ||
| 365 | $this->add($error); |
|
| 366 | ||
| 367 | return $this; |
|
| 368 | } |
|
| 369 | ||
| 370 | /** @noinspection PhpTooManyParametersInspection |
|
| 371 | * @param string $title |
|
| @@ 382-398 (lines=17) @@ | ||
| 379 | * |
|
| 380 | * @return $this |
|
| 381 | */ |
|
| 382 | protected function addResourceError( |
|
| 383 | $title, |
|
| 384 | $pointer, |
|
| 385 | $detail = null, |
|
| 386 | $status = null, |
|
| 387 | $idx = null, |
|
| 388 | LinkInterface $aboutLink = null, |
|
| 389 | $code = null, |
|
| 390 | $meta = null |
|
| 391 | ) { |
|
| 392 | $source = [Error::SOURCE_POINTER => $pointer]; |
|
| 393 | $error = new Error($idx, $aboutLink, $status, $code, $title, $detail, $source, $meta); |
|
| 394 | ||
| 395 | $this->add($error); |
|
| 396 | ||
| 397 | return $this; |
|
| 398 | } |
|
| 399 | ||
| 400 | /** |
|
| 401 | * @return string |
|