2021-11-18 04:24:30 +00:00
|
|
|
<?php
|
|
|
|
/*
|
|
|
|
* Copyright (c) 2020-2021 Антон Аксенов (Anthony Axenov)
|
|
|
|
*
|
|
|
|
* This code is licensed under MIT.
|
|
|
|
* Этот код распространяется по лицензии MIT.
|
|
|
|
* https://github.com/anthonyaxenov/atol-online/blob/master/LICENSE
|
|
|
|
*/
|
|
|
|
|
|
|
|
declare(strict_types = 1);
|
|
|
|
|
|
|
|
namespace AtolOnline\Exceptions;
|
|
|
|
|
2021-11-23 17:30:54 +00:00
|
|
|
use AtolOnline\Constants\Ffd105Tags;
|
|
|
|
|
2021-11-18 04:24:30 +00:00
|
|
|
/**
|
|
|
|
* Исключение, возникающее при ошибке валидации email
|
2021-11-23 17:30:54 +00:00
|
|
|
*
|
2021-11-22 06:51:10 +00:00
|
|
|
* @see https://online.atol.ru/files/API_atol_online_v4.pdf Документация, стр 17
|
2021-11-18 04:24:30 +00:00
|
|
|
*/
|
|
|
|
class InvalidEmailException extends AtolException
|
|
|
|
{
|
2021-11-23 17:30:54 +00:00
|
|
|
protected array $ffd_tags = [
|
2021-11-24 10:55:53 +00:00
|
|
|
Ffd105Tags::CLIENT_PHONE_EMAIL,
|
2021-11-23 17:30:54 +00:00
|
|
|
Ffd105Tags::COMPANY_EMAIL,
|
|
|
|
];
|
2021-11-18 04:24:30 +00:00
|
|
|
|
|
|
|
/**
|
2021-11-22 06:51:10 +00:00
|
|
|
* Конструктор
|
2021-11-18 04:24:30 +00:00
|
|
|
*
|
|
|
|
* @param string $email
|
|
|
|
*/
|
2021-11-22 06:51:10 +00:00
|
|
|
public function __construct(string $email = '')
|
2021-11-18 04:24:30 +00:00
|
|
|
{
|
2021-11-22 06:51:10 +00:00
|
|
|
parent::__construct("Невалидный email: '$email'");
|
2021-11-18 04:24:30 +00:00
|
|
|
}
|
2021-11-22 06:51:10 +00:00
|
|
|
}
|