-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support for custom data to be passed back by the Verifalia service
Added support for specifying the desired results quality level Aligned the internal REST client to the Verifalia v1.2 API Improved documentation for the SDK
- Loading branch information
Showing
7 changed files
with
149 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php | ||
namespace Verifalia\EmailAddresses; | ||
|
||
class Validation { | ||
public $entries = NULL; | ||
public $quality = NULL; | ||
|
||
public function __construct($entries, $quality = NULL) | ||
{ | ||
$this->entries = array(); | ||
$this->quality = $quality; | ||
|
||
if (is_array($entries)) { | ||
for($x = 0; $x < count($entries); $x++) { | ||
$this->addEntry($entries[$x]); | ||
} | ||
} | ||
else { | ||
$this->addEntry($entries); | ||
} | ||
} | ||
|
||
private function addEntry($entry) | ||
{ | ||
if (is_string($entry)) { | ||
array_push($this->entries, new ValidationEntry($entry)); | ||
} | ||
else if ($entry instanceof ValidationEntry) { | ||
array_push($this->entries, $entry); | ||
} | ||
else { | ||
throw new InvalidArgumentException('Invalid input entries, please review the data you are about to submit to Verifalia.'); | ||
} | ||
} | ||
} | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php | ||
namespace Verifalia\EmailAddresses; | ||
|
||
class ValidationEntry { | ||
public $inputData = NULL; | ||
public $custom = NULL; | ||
|
||
public function __construct($inputData, $custom = NULL) | ||
{ | ||
$this->inputData = $inputData; | ||
$this->custom = $custom; | ||
} | ||
} | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters