1 | <?php |
||
7 | class CheckResult |
||
8 | { |
||
9 | const STATUS_SUCCESS = 'success'; |
||
10 | const STATUS_FAILURE = 'failure'; |
||
11 | |||
12 | private $status; |
||
13 | private $value; |
||
14 | private $message; |
||
15 | private $attributes = array(); |
||
16 | private $ruleName; |
||
17 | |||
18 | /** |
||
19 | * @var Response |
||
20 | */ |
||
21 | private $response; |
||
22 | |||
23 | /** |
||
24 | * Result constructor. |
||
25 | * |
||
26 | * @param $status |
||
27 | * @param $value |
||
28 | * @param $message |
||
29 | */ |
||
30 | public function __construct($status, $message = '', $value = null) |
||
36 | |||
37 | /** |
||
38 | * @return array |
||
39 | */ |
||
40 | public function getAttributes() |
||
44 | |||
45 | /** |
||
46 | * @param array $attributes |
||
47 | */ |
||
48 | public function setAttributes($attributes) |
||
52 | |||
53 | /** |
||
54 | * @return mixed |
||
55 | */ |
||
56 | public function getStatus() |
||
60 | |||
61 | /** |
||
62 | * @return mixed |
||
63 | */ |
||
64 | public function getValue() |
||
68 | |||
69 | /** |
||
70 | * @return mixed |
||
71 | */ |
||
72 | public function getMessage() |
||
76 | |||
77 | /** |
||
78 | * @return Response |
||
79 | */ |
||
80 | public function getResponse() |
||
84 | |||
85 | /** |
||
86 | * @param Response $response |
||
87 | */ |
||
88 | public function setResponse(Response $response) |
||
92 | |||
93 | /** |
||
94 | * @return mixed |
||
95 | */ |
||
96 | public function getRuleName() |
||
100 | |||
101 | /** |
||
102 | * @param mixed $ruleName |
||
103 | */ |
||
104 | public function setRuleName($ruleName) |
||
108 | } |
||
109 |