MyCustomExceptionRenderer.php 485 B

12345678910111213141516171819202122232425
  1. <?php
  2. declare(strict_types=1);
  3. namespace TestApp\Error;
  4. use Cake\Error\ExceptionRenderer;
  5. class MyCustomExceptionRenderer extends ExceptionRenderer
  6. {
  7. /**
  8. * @param \Cake\Controller\Controller $controller
  9. */
  10. public function setController($controller): void
  11. {
  12. $this->controller = $controller;
  13. }
  14. /**
  15. * custom error message type.
  16. */
  17. public function missingWidgetThing(): string
  18. {
  19. return 'widget thing is missing';
  20. }
  21. }