1 <?php
2
3 4 5 6 7 8 9 10
11
12 namespace ICanBoogie\HTTP;
13
14 use ICanBoogie\Accessor\AccessorTrait;
15
16 17 18 19 20
21 class DispatcherNotDefined extends \LogicException implements Exception
22 {
23 use AccessorTrait;
24
25 private $dispatcher_id;
26
27 protected function get_dispatcher_id()
28 {
29 return $this->dispatcher_id;
30 }
31
32 public function __construct($dispatcher_id, $message = null, $code = 500, \Exception $previous = null)
33 {
34 $this->dispatcher_id = $dispatcher_id;
35
36 if (!$message)
37 {
38 $message = \ICanBoogie\format("The dispatcher %dispatcher_id is not defined.", [
39
40 'dispatcher_id' => $dispatcher_id
41
42 ]);
43 }
44
45 parent::__construct($message, $code, $previous);
46 }
47 }
48