| 1 | <?php |
||
| 3 | class ValidationError |
||
| 4 | { |
||
| 5 | const NAME_EMPTY = "name_empty"; |
||
| 6 | const NAME_EXISTS = "name_exists"; |
||
| 7 | const NAME_EXISTS_SUL = "name_exists"; |
||
| 8 | const NAME_NUMONLY = "name_numonly"; |
||
| 9 | const NAME_INVALIDCHAR = "name_invalidchar"; |
||
| 10 | const NAME_SANITISED = "name_sanitised"; |
||
| 11 | const EMAIL_EMPTY = "email_empty"; |
||
| 12 | const EMAIL_WIKIMEDIA = "email_wikimedia"; |
||
| 13 | const EMAIL_INVALID = "email_invalid"; |
||
| 14 | const EMAIL_MISMATCH = "email_mismatch"; |
||
| 15 | const OPEN_REQUEST_NAME = "open_request_name"; |
||
| 16 | const BANNED = "banned"; |
||
| 17 | const BANNED_TOR = "banned_tor"; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * Summary of $errorCode |
||
| 21 | * @var string |
||
| 22 | */ |
||
| 23 | private $errorCode; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Summary of $isError |
||
| 27 | * @var bool |
||
| 28 | */ |
||
| 29 | private $isError; |
||
| 30 | |||
| 31 | /** |
||
| 32 | * Summary of __construct |
||
| 33 | * @param string $errorCode |
||
| 34 | * @param bool $isError |
||
| 35 | */ |
||
| 36 | public function __construct($errorCode, $isError = true) |
||
| 40 | } |
||
| 41 | |||
| 42 | /** |
||
| 43 | * Summary of getErrorCode |
||
| 44 | * @return string |
||
| 45 | */ |
||
| 46 | public function getErrorCode() |
||
| 47 | { |
||
| 48 | return $this->errorCode; |
||
| 49 | } |
||
| 50 | |||
| 51 | /** |
||
| 52 | * Summary of isError |
||
| 53 | * @return bool |
||
| 54 | */ |
||
| 55 | public function isError() |
||
| 58 | } |
||
| 59 | } |
||
| 60 |