| 1 | <?php |
||
| 10 | class ErrorManager |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * @var TranslatorInterface |
||
| 14 | */ |
||
| 15 | private $translator; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @param TranslatorInterface $translator |
||
| 19 | */ |
||
| 20 | public function __construct(TranslatorInterface $translator) |
||
| 24 | |||
| 25 | /** |
||
| 26 | * @param string $type |
||
| 27 | * @param array $arguments |
||
| 28 | * |
||
| 29 | * @return Error |
||
| 30 | */ |
||
| 31 | public function createByMissingModel(string $type, array $arguments): Error |
||
| 41 | |||
| 42 | /** |
||
| 43 | * @param array $errors |
||
| 44 | * @param string $locale |
||
| 45 | * @param string $scope |
||
| 46 | * @param string $type |
||
| 47 | * |
||
| 48 | * @return Error |
||
| 49 | */ |
||
| 50 | public function createByValidationErrors(array $errors, string $locale, string $scope, string $type): Error |
||
| 64 | |||
| 65 | /** |
||
| 66 | * @param string $type |
||
| 67 | * @param string $contentType |
||
| 68 | * @param string $body |
||
| 69 | * @return Error |
||
| 70 | */ |
||
| 71 | public function createNotParsable(string $type, string $contentType, string $body): Error |
||
| 81 | } |
||
| 82 |