承接 endeavors/support-vo 相关项目开发

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

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

endeavors/support-vo

Composer 安装命令:

composer require endeavors/support-vo

包简介

A flexible approach to handle data types as value objects. Email address as a value object and email address validation.

README 文档

README

A library designed to take an object oriented approach when working with primitive types in php.

Installation

composer require endeavors/support-vo

Usage

Using this package is fairly straightforward. Simply create the value object and you are ready to go. Most of the value objects offer a factory creation:

SomeClass::create('somevalue');

The value given to the value object is validated.

An email address value object:

use Endeavors\Support\VO\EmailAddress;

// is valid
EmailAddress::create('bob@email.com');

// will throw an exception
EmailAddress::create('somevalue');

A day value object:

use Endeavors\Support\VO\Time\Day;

// is valid
Day::fromSeconds(60 * 60 * 24);

// will throw an exception
Day::fromSeconds("an invalid second");

to-do

  1. Support more built-in string functions e.g. trim, rtrim
  2. Support specific objects other than email such as phone, state, or country
  3. Determine performance of position method in ModernString
  4. Add more comprehensive documentation

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-11-02

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固