We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b101d9c commit cc448a6Copy full SHA for cc448a6
1 file changed
src/Controller/MailboxValidatorController.php
@@ -9,17 +9,24 @@ class MailboxValidatorController{
9
private $singleValidationApiUrl = 'https://api.mailboxvalidator.com/v2/validation/single';
10
private $disposableEmailApiUrl = 'https://api.mailboxvalidator.com/v2/email/disposable';
11
private $freeEmailApiUrl = 'https://api.mailboxvalidator.com/v2/email/free';
12
+ private $api_key;
13
14
public function __construct()
15
{
- $this->api_key = Configure::read('MBV_API_KEY');
16
+ $this->api_key = self::getApiKey();
17
}
18
19
public function __destruct()
20
21
22
23
24
+ // Static method to get the API key
25
+ private static function getApiKey()
26
+ {
27
+ return Configure::read('MBV_API_KEY');
28
+ }
29
+
30
public function single ($email) {
31
if (trim($email) != '') {
32
try {
0 commit comments