|
@@ 250-261 (lines=12) @@
|
| 247 |
|
* @param string $specificDetails optional |
| 248 |
|
* @return ErrorObject |
| 249 |
|
*/ |
| 250 |
|
public function getUnsupportedSortErrorObject($genericTitle=null, $specificDetails=null) { |
| 251 |
|
$errorObject = new ErrorObject('Unsupported sort'); |
| 252 |
|
$errorObject->appendTypeLink('https://jsonapi.org/profiles/ethanresnick/cursor-pagination/unsupported-sort'); |
| 253 |
|
$errorObject->blameQueryParameter('sort'); |
| 254 |
|
$errorObject->setHttpStatusCode(400); |
| 255 |
|
|
| 256 |
|
if ($genericTitle !== null) { |
| 257 |
|
$errorObject->setHumanExplanation($genericTitle, $specificDetails); |
| 258 |
|
} |
| 259 |
|
|
| 260 |
|
return $errorObject; |
| 261 |
|
} |
| 262 |
|
|
| 263 |
|
/** |
| 264 |
|
* get an ErrorObject for when the requested page size exceeds the server-defined max page size |
|
@@ 339-349 (lines=11) @@
|
| 336 |
|
* @param string $specificDetails optional |
| 337 |
|
* @return ErrorObject |
| 338 |
|
*/ |
| 339 |
|
public function getRangePaginationNotSupportedErrorObject($genericTitle=null, $specificDetails=null) { |
| 340 |
|
$errorObject = new ErrorObject('Range pagination not supported'); |
| 341 |
|
$errorObject->appendTypeLink('https://jsonapi.org/profiles/ethanresnick/cursor-pagination/range-pagination-not-supported'); |
| 342 |
|
$errorObject->setHttpStatusCode(400); |
| 343 |
|
|
| 344 |
|
if ($genericTitle !== null) { |
| 345 |
|
$errorObject->setHumanExplanation($genericTitle, $specificDetails); |
| 346 |
|
} |
| 347 |
|
|
| 348 |
|
return $errorObject; |
| 349 |
|
} |
| 350 |
|
|
| 351 |
|
/** |
| 352 |
|
* internal api |