diff --git a/readme.md b/readme.md index 445d5ffe..ee4bdadb 100644 --- a/readme.md +++ b/readme.md @@ -110,6 +110,7 @@ Each of the generator properties (like `name`, `address`, and `lorem`) are calle email // 'tkshlerin@collins.com' safeEmail // 'king.alford@example.org' freeEmail // 'bradley72@gmail.com' + companyEmail // 'russel.durward@mcdermott.org' freeEmailDomain // 'yahoo.com' userName // 'wade55' domainName // 'wolffdeckow.net' diff --git a/src/Faker/Provider/Internet.php b/src/Faker/Provider/Internet.php index 5bf6725f..586bb428 100644 --- a/src/Faker/Provider/Internet.php +++ b/src/Faker/Provider/Internet.php @@ -16,6 +16,7 @@ class Internet extends \Faker\Provider\Base ); protected static $emailFormats = array( '{{userName}}@{{domainName}}', + '{{userName}}@{{freeEmailDomain}}', ); protected static $urlFormats = array( 'http://www.{{domainName}}/', @@ -47,6 +48,14 @@ class Internet extends \Faker\Provider\Base return $this->userName() . '@' . static::freeEmailDomain(); } + /** + * @example 'jdoe@dawson.com' + */ + public function companyEmail() + { + return $this->userName() . '@' . $this->domainName(); + } + /** * @example 'gmail.com' */