1 | <?php |
||
13 | class CandidateProcessor |
||
14 | { |
||
15 | const FATAL_POST_CHECK_ERROR = 'Your candidate query has failed. There was no entry in target changelog table added. Try adding query manually for more error.'; |
||
16 | /** @var CheckInterface[] */ |
||
17 | private $checks; |
||
18 | |||
19 | /** @var string */ |
||
20 | private $lastError; |
||
21 | |||
22 | /** @var string */ |
||
23 | private $lastErrorMessage; |
||
24 | |||
25 | /** @var CheckInterface[] */ |
||
26 | private $postChecks; |
||
27 | |||
28 | |||
29 | |||
30 | /** |
||
31 | * CandidateProcessor constructor |
||
32 | */ |
||
33 | public function __construct() |
||
38 | |||
39 | |||
40 | |||
41 | /** |
||
42 | * @param CheckInterface $check |
||
43 | */ |
||
44 | public function addCheck(CheckInterface $check) |
||
48 | |||
49 | |||
50 | |||
51 | public function addPostCheck(CheckInterface $check) |
||
55 | |||
56 | /** |
||
57 | * @param Candidate $candidate |
||
58 | * @return bool |
||
59 | */ |
||
60 | public function isValid(Candidate $candidate) |
||
74 | |||
75 | |||
76 | |||
77 | /** |
||
78 | * @param Candidate $candidate |
||
79 | */ |
||
80 | public function postValidate(Candidate $candidate) |
||
88 | |||
89 | /** |
||
90 | * @return string |
||
91 | */ |
||
92 | public function getLastError() |
||
96 | |||
97 | |||
98 | |||
99 | /** |
||
100 | * @return string |
||
101 | */ |
||
102 | public function getLastErrorMessage() |
||
106 | } |