enum:PHP枚举实现

时间:2021-06-05 18:04:01
【文件属性】:
文件名称:enum:PHP枚举实现
文件大小:11KB
文件格式:ZIP
更新时间:2021-06-05 18:04:01
PHP PHP枚举实现 ##文档 构造 $ type = new Type ( Type :: BASIC ); $ type = Type :: createFromConstantName ( 'BASIC' ); $ type = Type :: BASIC (); new Type ( 5 ); // InvalidArgumentException 实例方法 $ type -> getValue (); // 1 $ type -> getName (); // BASIC $ type -> isEqual ( $ type ); // true $ type -> isEqual ( Type :: Basic ); // true 静态方法 Type :: getValues (); // [1, 2] Type :: getNames (); // [1 => 'BASI
【文件预览】:
enum-master
----src()
--------Esky()
----.travis.yml(198B)
----LICENSE(1KB)
----phpunit.xml(374B)
----README.md(837B)
----tests()
--------Esky()
----.gitignore(23B)
----composer.json(344B)

网友评论