1 | <?php |
||
7 | class Config |
||
8 | { |
||
9 | const MANDATORY_ENV_VARIABLES = [ |
||
10 | self::SMTP_USER, |
||
11 | self::SMTP_PASSWORD, |
||
12 | self::SMTP_HOST, |
||
13 | self::EMAIL_SUBJECT, |
||
14 | self::FROM_EMAIL, |
||
15 | ]; |
||
16 | const SMTP_USER = 'SMTP_USER'; |
||
17 | const SMTP_PASSWORD = 'SMTP_PASSWORD'; |
||
18 | const SMTP_HOST = 'SMTP_HOST'; |
||
19 | const EMAIL_SUBJECT = 'EMAIL_SUBJECT'; |
||
20 | const FROM_EMAIL = 'FROM_EMAIL'; |
||
21 | const FROM_NAME = 'FROM_NAME'; |
||
22 | const TO_EMAILS = 'TO_EMAILS'; |
||
23 | const SERVER_HOST = 'SERVER_HOST'; |
||
24 | |||
25 | |||
26 | |||
27 | public function __construct(string $path) |
||
33 | |||
34 | |||
35 | |||
36 | public function getSmtpUsername(): string |
||
40 | |||
41 | |||
42 | |||
43 | public function getSmtpPassword(): string |
||
47 | |||
48 | |||
49 | |||
50 | public function getSmtpHost(): string |
||
54 | |||
55 | |||
56 | |||
57 | public function getEmailSubject(): string |
||
61 | |||
62 | |||
63 | |||
64 | public function getFromEmail(): string |
||
68 | |||
69 | |||
70 | |||
71 | public function getFromName(): string |
||
75 | |||
76 | |||
77 | |||
78 | public function getRecipientsList(): array |
||
82 | |||
83 | |||
84 | |||
85 | public function getServerHost(): string |
||
89 | } |