| @@ 327-343 (lines=17) @@ | ||
| 324 | * |
|
| 325 | * @return $this |
|
| 326 | */ |
|
| 327 | public function addQueryParameterError( |
|
| 328 | $name, |
|
| 329 | $title, |
|
| 330 | $detail = null, |
|
| 331 | $status = null, |
|
| 332 | $idx = null, |
|
| 333 | LinkInterface $aboutLink = null, |
|
| 334 | $code = null, |
|
| 335 | $meta = null |
|
| 336 | ) { |
|
| 337 | $source = [Error::SOURCE_PARAMETER => $name]; |
|
| 338 | $error = new Error($idx, $aboutLink, $status, $code, $title, $detail, $source, $meta); |
|
| 339 | ||
| 340 | $this->add($error); |
|
| 341 | ||
| 342 | return $this; |
|
| 343 | } |
|
| 344 | ||
| 345 | /** @noinspection PhpTooManyParametersInspection |
|
| 346 | * @param string $title |
|
| @@ 357-373 (lines=17) @@ | ||
| 354 | * |
|
| 355 | * @return $this |
|
| 356 | */ |
|
| 357 | protected function addResourceError( |
|
| 358 | $title, |
|
| 359 | $pointer, |
|
| 360 | $detail = null, |
|
| 361 | $status = null, |
|
| 362 | $idx = null, |
|
| 363 | LinkInterface $aboutLink = null, |
|
| 364 | $code = null, |
|
| 365 | $meta = null |
|
| 366 | ) { |
|
| 367 | $source = [Error::SOURCE_POINTER => $pointer]; |
|
| 368 | $error = new Error($idx, $aboutLink, $status, $code, $title, $detail, $source, $meta); |
|
| 369 | ||
| 370 | $this->add($error); |
|
| 371 | ||
| 372 | return $this; |
|
| 373 | } |
|
| 374 | ||
| 375 | /** |
|
| 376 | * @return string |
|