1 | <?php |
||
21 | class NotFoundException extends RuntimeException |
||
22 | { |
||
23 | /** |
||
24 | * Creates an exception for a not found message name, method name or handler for a given message. |
||
25 | * |
||
26 | * @param string $type |
||
27 | * @param mixed $message |
||
28 | * @param Exception|null $cause |
||
29 | * |
||
30 | * @return NotFoundException |
||
31 | */ |
||
32 | protected static function notFound($type, $message, Exception $cause = null) |
||
40 | |||
41 | /** |
||
42 | * @param mixed $object |
||
43 | * @param Exception|null $cause |
||
44 | * |
||
45 | * @return NotFoundException |
||
46 | */ |
||
47 | public static function nameOfMessage($object, Exception $cause = null) |
||
51 | |||
52 | /** |
||
53 | * @param mixed $object |
||
54 | * @param Exception|null $cause |
||
55 | * |
||
56 | * @return NotFoundException |
||
57 | */ |
||
58 | public static function nameOfCommand($object, Exception $cause = null) |
||
62 | |||
63 | /** |
||
64 | * @param mixed $object |
||
65 | * @param Exception|null $cause |
||
66 | * |
||
67 | * @return NotFoundException |
||
68 | */ |
||
69 | public static function handlerMethodNameForObject($object, Exception $cause = null) |
||
73 | |||
74 | /** |
||
75 | * @param mixed $object |
||
76 | * @param Exception|null $cause |
||
77 | * |
||
78 | * @return NotFoundException |
||
79 | */ |
||
80 | public static function nameOfQuery($object, Exception $cause = null) |
||
84 | |||
85 | /** |
||
86 | * @param string $messageName |
||
87 | * @param Exception|null $cause |
||
88 | * |
||
89 | * @return NotFoundException |
||
90 | */ |
||
91 | public static function handlerFor($messageName, Exception $cause = null) |
||
98 | |||
99 | /** |
||
100 | * Creates an exception for a not found middleware. |
||
101 | * |
||
102 | * @param string $type |
||
103 | * @param Exception|null $cause |
||
104 | * |
||
105 | * @return NotFoundException |
||
106 | */ |
||
107 | public static function middlewareOfType($type, Exception $cause = null) |
||
114 | |||
115 | /** |
||
116 | * @param mixed $object |
||
117 | * @param string $method |
||
118 | * @param Exception|null $cause |
||
119 | * |
||
120 | * @return NotFoundException |
||
121 | */ |
||
122 | public static function methodForObject($object, $method, Exception $cause = null) |
||
126 | } |
||
127 |