| 1 | <?php | ||
| 21 | trait LookupTrait | ||
| 22 | { | ||
| 23 | /** | ||
| 24 | * @param mixed $object | ||
| 25 | * @return mixed|Response | ||
| 26 | */ | ||
| 27 | abstract protected function runInternal($object); | ||
| 28 | |||
| 29 | /** | ||
| 30 | * @param string|int $identifier | ||
| 31 | * @return mixed|null | ||
| 32 | */ | ||
| 33 | abstract protected function find($identifier); | ||
| 34 | |||
| 35 | /** | ||
| 36 | * @param $identifier | ||
| 37 | * @return mixed|null|Response | ||
| 38 | * @throws HttpException | ||
| 39 | */ | ||
| 40 | public function run($identifier) | ||
| 48 | |||
| 49 | /** | ||
| 50 | * HTTP not found response code | ||
| 51 | * | ||
| 52 | * @return int | ||
| 53 | */ | ||
| 54 | protected function statusCodeNotFound(): int | ||
| 58 | |||
| 59 | /** | ||
| 60 | * @return string | ||
| 61 | */ | ||
| 62 | protected function messageNotFound(): string | ||
| 66 | |||
| 67 | /** | ||
| 68 | * @return null | ||
| 69 | * @throws HttpException | ||
| 70 | */ | ||
| 71 | protected function handleNotFoundResponse() | ||
| 78 | } | ||
| 79 |