1: <?php
2:
3: /**
4: *
5: * @package Plugin
6: * @subpackage FormAssistant
7: * @version SVN Revision $Rev:$
8: * @author marcus.gnass
9: * @copyright four for business AG
10: * @link http://www.4fb.de
11: */
12:
13: // assert CONTENIDO framework
14: defined('CON_FRAMEWORK') || die('Illegal call: Missing framework initialization - request aborted.');
15:
16: /**
17: * Base class for all PIFA related exceptions.
18: *
19: * @author marcus.gnass
20: */
21: class PifaException extends cException {
22: }
23:
24: /**
25: * Exceptions indicating a problem when PIFA tries to access the database.
26: *
27: * @author marcus.gnass
28: */
29: class PifaDatabaseException extends PifaException {
30: }
31:
32: /**
33: * Exceptions indicating that a certain PIFA feature is not yet implemented.
34: *
35: * @author marcus.gnass
36: */
37: class PifaNotImplementedException extends PifaException {
38: }
39:
40: /**
41: * Exceptions indicating that PIFA reached an illegal state.
42: * This happens e.g. if permissions for a certain action are missing.
43: *
44: * @author marcus.gnass
45: */
46: class PifaIllegalStateException extends PifaException {
47: }
48:
49: /**
50: * Currently not in use.
51: *
52: * @author marcus.gnass
53: */
54: class PifaNotYetStoredException extends PifaException {
55: }
56:
57: /**
58: * Exceptions indicating that invalid data was found when PIFA tried to process
59: * posted data.
60: *
61: * @author marcus.gnass
62: */
63: class PifaValidationException extends PifaException {
64:
65: /**
66: *
67: * @var array
68: */
69: private $_errors = array();
70:
71: /**
72: *
73: * @param array $errors
74: */
75: public function __construct(array $errors) {
76: // parent::__construct($message, $code, $previous);
77: $this->_errors = $errors;
78: }
79:
80: /**
81: *
82: * @return array
83: */
84: public function getErrors() {
85: return $this->_errors;
86: }
87: }
88:
89: /**
90: * Exceptions indicating a problem when PIFA tries to send a mail.
91: *
92: * @author marcus.gnass
93: */
94: class PifaMailException extends PifaException {
95: }
96: