## Apache Zeta Components Manual :: File Source for basic_handler.php

## Source for file basic_handler.php

Documentation is available at basic_handler.php

1. <?php
2. /**
3. *
4. * Licensed to the Apache Software Foundation (ASF) under one
5. * or more contributor license agreements. See the NOTICE file
6. * distributed with this work for additional information
7. * regarding copyright ownership. The ASF licenses this file
8. * to you under the Apache License, Version 2.0 (the
9. * "License"); you may not use this file except in compliance
10. * with the License. You may obtain a copy of the License at
11. *
12. * http://www.apache.org/licenses/LICENSE-2.0
13. *
14. * Unless required by applicable law or agreed to in writing,
15. * software distributed under the License is distributed on an
16. * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17. * KIND, either express or implied. See the License for the
18. * specific language governing permissions and limitations
19. * under the License.
20. *
21. * @license http://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
22. * @version //autogentag//
23. * @filesource
24. * @package Execution
25. */
27. /**
28. * Simple implementation of a callback handler to use with ezcExecution.
29. *
30. * This is a very simple callback handler which only issues a simple message.
31. * Of course in applications you will need to either extend this class, or just
32. * implement the ezcExecutionErrorHandler interface.
33. *
34. * @package Execution
35. * @version //autogentag//
36. */
37. class ezcExecutionBasicErrorHandler implements ezcExecutionErrorHandler
38. {
39. /**
40. * Processes an error situation
41. *
42. * This method is called by the ezcExecution environment whenever an error
43. * situation (uncaught exception or fatal error) happens. It accepts one
44. * default parameter in case there was an uncaught exception.
45. *
46. * This class just serves as an example, for your own application you
47. * should write your own class that implements the ezcExecutionErrorHandler
48. * interface and use that as parameter to {@link ezcExecution::init()}
49. *
50. * @param Exception $e
51. *
52. * @return void
53. */
54. static public function onError ( Exception $e = null )
55. {
56. echo <<<END
57. This application stopped in an unclean way. Please contact the site
58. administrator to report the error.
60. Have a nice day!
62. END;
63. }
64. }
65. ?>

Documentation generated by phpDocumentor 1.4.3