Skip to content

Commit d63b730

Browse files
Update major version.
1 parent 0e72b3e commit d63b730

File tree

2 files changed

+21
-21
lines changed

2 files changed

+21
-21
lines changed

README.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Add the following to your composer.json file:
2020

2121
```
2222
"require": {
23-
"mailboxvalidator/mailboxvalidator-php": "1.1.*"
23+
"mailboxvalidator/mailboxvalidator-php": "2.0.*"
2424
}
2525
```
2626

@@ -36,11 +36,11 @@ Go to https://www.mailboxvalidator.com/plans#api to sign up for FREE API plan an
3636
Functions
3737
=========
3838

39-
## SingleValidation (api_key)
39+
## **EmailValidation** (api_key)
4040

4141
Creates a new instance of the MailboxValidator object with the API key.
4242

43-
## ValidateEmail (email_address)
43+
## validateEmail (email_address)
4444

4545
Performs email validation on the supplied email address.
4646

@@ -69,7 +69,7 @@ Performs email validation on the supplied email address.
6969
| error_code | The error code if there is any error. See error table in the below section. |
7070
| error_message | The error message if there is any error. See error table in the below section. |
7171

72-
## DisposableEmail (email_address)
72+
## isDisposableEmail (email_address)
7373

7474
Check if the supplied email address is from a disposable email provider.
7575

@@ -83,7 +83,7 @@ Check if the supplied email address is from a disposable email provider.
8383
| error_code | The error code if there is any error. See error table in the below section. |
8484
| error_message | The error message if there is any error. See error table in the below section. |
8585

86-
## FreeEmail (email_address)
86+
## isFreeEmail (email_address)
8787

8888
Check if the supplied email address is from a free email provider.
8989

@@ -106,16 +106,16 @@ Sample Codes
106106
<?php
107107
require_once __DIR__ . '/vendor/autoload.php';
108108

109-
use MailboxValidator\SingleValidation;
109+
use MailboxValidator\EmailValidation ;
110110

111-
$mbv = new SingleValidation('PASTE_YOUR_API_KEY_HERE');
111+
$mbv = new EmailValidation ('PASTE_YOUR_API_KEY_HERE');
112112

113-
$results = $mbv->ValidateEmail('[email protected]');
113+
$results = $mbv->validateEmail('[email protected]');
114114

115-
if ($results === false) {
115+
if ($results === null) {
116116
echo "Error connecting to API.\n";
117117
}
118-
else if (trim($results->error_code) == '') {
118+
else if (trim($results->error_code) === '') {
119119
echo 'email_address = ' . $results->email_address . "\n";
120120
echo 'domain = ' . $results->domain . "\n";
121121
echo 'is_free = ' . $results->is_free . "\n";
@@ -149,16 +149,16 @@ else {
149149
<?php
150150
require_once __DIR__ . '/vendor/autoload.php';
151151

152-
use MailboxValidator\SingleValidation;
152+
use MailboxValidator\EmailValidation;
153153

154-
$mbv = new SingleValidation('PASTE_YOUR_API_KEY_HERE');
154+
$mbv = new EmailValidation('PASTE_YOUR_API_KEY_HERE');
155155

156-
$results = $mbv->DisposableEmail('[email protected]');
156+
$results = $mbv->isDisposableEmail('[email protected]');
157157

158-
if ($results === false) {
158+
if ($results === null) {
159159
echo "Error connecting to API.\n";
160160
}
161-
else if (trim($results->error_code) == '') {
161+
else if (trim($results->error_code) === '') {
162162
echo 'email_address = ' . $results->email_address . "\n";
163163
echo 'is_disposable = ' . $results->is_disposable . "\n";
164164
echo 'credits_available = ' . $results->credits_available . "\n";
@@ -176,16 +176,16 @@ else {
176176
<?php
177177
require_once __DIR__ . '/vendor/autoload.php';
178178

179-
use MailboxValidator\SingleValidation;
179+
use MailboxValidator\EmailValidation;
180180

181-
$mbv = new SingleValidation('PASTE_YOUR_API_KEY_HERE');
181+
$mbv = new EmailValidation('PASTE_YOUR_API_KEY_HERE');
182182

183-
$results = $mbv->FreeEmail('[email protected]');
183+
$results = $mbv->isFreeEmail('[email protected]');
184184

185-
if ($results === false) {
185+
if ($results === null) {
186186
echo "Error connecting to API.\n";
187187
}
188-
else if (trim($results->error_code) == '') {
188+
else if (trim($results->error_code) === '') {
189189
echo 'email_address = ' . $results->email_address . "\n";
190190
echo 'is_free = ' . $results->is_free . "\n";
191191
echo 'credits_available = ' . $results->credits_available . "\n";

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@
1818
"MailboxValidator\\": "src/"
1919
}
2020
},
21-
"version": "1.1.0"
21+
"version": "2.0.0"
2222
}

0 commit comments

Comments
 (0)