From 52a1d4bd08f2ccc8cb8cf1a88bd73bedb899c3db Mon Sep 17 00:00:00 2001 From: Dave Earley Date: Tue, 18 Jul 2017 19:31:48 +0100 Subject: [PATCH] Update readme with information on adding data source --- README.md | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/README.md b/README.md index 17e9a59..327ec71 100644 --- a/README.md +++ b/README.md @@ -124,6 +124,55 @@ docker-compose up -d ``` in the repository root. You can then validate an email by navigating to http://localhost:8880?email=email.to.validate@example.com. The result will be JSON string as per above. +## Adding a custom data source + +The easiest way to add new data is to update the [data files](https://github.com/daveearley/Email-Validation-Tool/tree/master/src/data) manually. You can also create your own data provider by creating a data provider class which implements the [EmailValidation\EmailDataProviderInterface](https://github.com/daveearley/Email-Validation-Tool/blob/master/src/EmailDataProviderInterface.php). + +Example Code: + +```php +