| 1 | <?php |
||
| 23 | abstract class AbstractValidationStatus implements ValidationStatusInterface { |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Get the code. |
||
| 27 | * |
||
| 28 | * @var int |
||
| 29 | */ |
||
| 30 | private $code; |
||
| 31 | |||
| 32 | /** |
||
| 33 | * Message. |
||
| 34 | * |
||
| 35 | * @var string |
||
| 36 | */ |
||
| 37 | private $message; |
||
| 38 | |||
| 39 | /** |
||
| 40 | * Rule name. |
||
| 41 | * |
||
| 42 | * @var string |
||
| 43 | */ |
||
| 44 | private $ruleName; |
||
| 45 | |||
| 46 | /** |
||
| 47 | * Constructor. |
||
| 48 | * |
||
| 49 | * @param int $code The code. |
||
| 50 | * @param string $message The message. |
||
| 51 | */ |
||
| 52 | protected function __construct($code, $message) { |
||
| 56 | |||
| 57 | /** |
||
| 58 | * {@inheritdoc} |
||
| 59 | */ |
||
| 60 | public function getCode() { |
||
| 63 | |||
| 64 | /** |
||
| 65 | * {@inheritdoc} |
||
| 66 | */ |
||
| 67 | public function getMessage() { |
||
| 70 | |||
| 71 | /** |
||
| 72 | * {@inheritdoc} |
||
| 73 | */ |
||
| 74 | public function getRuleName() { |
||
| 77 | |||
| 78 | /** |
||
| 79 | * Set the code. |
||
| 80 | * |
||
| 81 | * @param int $code The code. |
||
| 82 | * @return ValidationStatusInterface Returns this validation status. |
||
| 83 | */ |
||
| 84 | public function setCode($code) { |
||
| 88 | |||
| 89 | /** |
||
| 90 | * Set the message. |
||
| 91 | * |
||
| 92 | * @param string $message The message. |
||
| 93 | * @return ValidationStatusInterface Returns this validation status. |
||
| 94 | */ |
||
| 95 | public function setMessage($message) { |
||
| 99 | |||
| 100 | /** |
||
| 101 | * {@inheritdoc} |
||
| 102 | */ |
||
| 103 | public function setRuleName($ruleName) { |
||
| 107 | |||
| 108 | } |
||
| 109 |