承接 mediagone/types-common 相关项目开发

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

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

mediagone/types-common

最新稳定版本:0.7.13

Composer 安装命令:

composer require mediagone/types-common

包简介

A collection of generic Value Objects you should (always) use instead of primitive types!

README 文档

README

Latest Version on Packagist Total Downloads Software License

Value Objects are small and immutable classes representing typed values usually implemented using PHP primitive types. However, objects can embed validation to ensure that your data is always valid without adding any check elsewhere in your code. That's why you should ALWAYS use Value Objects rather than primitive types!

This package provides most common types you can use in any project.

Installation

This package requires PHP 7.4+

Add it as Composer dependency:

$ composer require mediagone/types-common

Available value-objects

All value-objects implement a common ValueObject interface and JsonSerializable.

Business

  • Bic
  • Iban

Crypto

  • Hash (abstract class)
  • HashBcrypt
  • HashArgon2id
  • RandomToken
  • Sha512

Note: all Hash* types are based on Hash base class, so they are perfectly interoperable.

Geo

  • Address
  • City
  • Country
  • Latitude
  • Longitude

Graphics

  • Color

System

  • Age
  • Base64
  • Binary
  • Count
  • Date
  • DateTimeUTC
  • DayOfMonth
  • Duration
  • Hex
  • Quantity

Text

  • Name
  • NameDigit
  • NameSpecial
  • Slug
  • SlugSnake
  • Text
  • TextMedium
  • Title

Web

  • EmailAddress
  • Url
  • UrlHost
  • UrlPath

License

Types Common is licensed under MIT license. See LICENSE file.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-03-09