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