This repository was archived by the owner on Jan 1, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed
module/Application/view/error Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+ use Zend \Mvc \Application ;
3
+ ?>
1
4
<h1>A 404 error occurred</h1>
2
5
<h2><?= $ this ->message ?> </h2>
3
6
4
- <?php if (! empty ($ this ->reason )) : ?>
5
- <?php
7
+ <?php if (! empty ($ this ->reason )) :
6
8
switch ($ this ->reason ) {
7
- case \ Zend \ Mvc \ Application::ERROR_CONTROLLER_CANNOT_DISPATCH :
9
+ case Application::ERROR_CONTROLLER_CANNOT_DISPATCH :
8
10
$ reasonMessage = 'The requested controller was unable to dispatch the request. ' ;
9
11
break ;
10
- case \ Zend \ Mvc \ Application::ERROR_MIDDLEWARE_CANNOT_DISPATCH :
12
+ case Application::ERROR_MIDDLEWARE_CANNOT_DISPATCH :
11
13
$ reasonMessage = 'The requested middleware was unable to dispatch the request. ' ;
12
14
break ;
13
- case \ Zend \ Mvc \ Application::ERROR_CONTROLLER_NOT_FOUND :
15
+ case Application::ERROR_CONTROLLER_NOT_FOUND :
14
16
$ reasonMessage = 'The requested controller could not be mapped to an existing controller class. ' ;
15
17
break ;
16
- case \ Zend \ Mvc \ Application::ERROR_CONTROLLER_INVALID :
18
+ case Application::ERROR_CONTROLLER_INVALID :
17
19
$ reasonMessage = 'The requested controller was not dispatchable. ' ;
18
20
break ;
19
- case \ Zend \ Mvc \ Application::ERROR_ROUTER_NO_MATCH :
21
+ case Application::ERROR_ROUTER_NO_MATCH :
20
22
$ reasonMessage = 'The requested URL could not be matched by routing. ' ;
21
23
break ;
22
24
default :
23
25
$ reasonMessage = 'We cannot determine at this time why a 404 was generated. ' ;
24
26
break ;
25
27
}
26
- ?>
28
+ ?>
27
29
<p><?= $ reasonMessage ?> </p>
28
30
<?php endif ?>
29
31
You can’t perform that action at this time.
0 commit comments