承接 gerritdrost/phenum 相关项目开发

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

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

gerritdrost/phenum

最新稳定版本:v1.0.2

Composer 安装命令:

composer require gerritdrost/phenum

包简介

Because PHP needs Enums

README 文档

README

PHP has native support for enums since version 8.1. Use those if you have the chance.

phenum

Enums for PHP, nuff said.

Description

A lot of people love enums. Unfortunately, PHP does not support them out-of-the-box, it requires SplEnum to be installed. I stumbled across this problems as well and decided to attempt to solve it: say hello to phenum.

Why phenum?

Because it's easy to use and has some cool features. Enum values are actually are singleton objects, they have their own instance and can have their own variables! Also the library provides utility classes like the EnumMap which can be used to map values to Enums, something not possible with regular PHP arrays.

Dependencies

PHP 8.1 or newer.

Setup

Include gerritdrost/phenum using composer.

Documentation

统计信息

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

GitHub 信息

  • Stars: 14
  • Watchers: 2
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-03-23