承接 black/email 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

black/email

Composer 安装命令:

composer require black/email

包简介

A simple email value object for your projects

README 文档

README

PHP 5.4+ library to make working with Email safer, easier, and fun!

SensioLabsInsight Build Status Scrutinizer Quality Score Latest Stable Version Total Downloads

Installation

The recommended way to install Email is through Composer:

{
    "require": {
        "black/email": "@stable"
    }
}

Protip: You should browse the black/email page to choose a stable version to use, avoid the @stable meta constraint.

Usage

Usage is simple. Just create a new EmailEmail, if your email is invalid an Email\Exception\InvalidEmailEmailException will be thrown. Be aware of this, the validation is on the format, not on a A or MX record in a valid DNS.

$email = new Email\EmailEmail("foo@bar.com");
$email->getValue(); // return foot@bar.com
$email->getValueAsArray() // return ['recipient' => "foo", 'domain' => "bar", 'tld' => "com"]

List of available getters

  • getValue()
  • getValueAsArray()
  • getRecipient()
  • getDomain()
  • getTld()

Check if two email are equals

isEqualTo(Email\EmailEmail $email): Check if two emails are equals

WARNING

FILTER_VALIDATE_EMAIL will not works with non-standard ASCII characters so an email like this me@domain.中国 will throw an InvalidEmailAddressException.

FILTER_VALIDATE_EMAIL don't know rules of providers. 0me@hotmail.com is invalid for hotmail but valid for PHP.

License

Email is released under the MIT License. See the bundled LICENSE file for details.

Contributing

See CONTRIBUTING file.

Credits

This README is heavily inspired by Geocoder library by the great @willdurand. This guy needs your PR for the sake of the REST in PHP.

Alexandre "pocky" Balmes alexandre@lablackroom.com. Send me Flattrs if you love my work, buy me gift or hire me!

统计信息

  • 总下载量: 261
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 3
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-10-21

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固