Download the PHP package patr1k/phenum without Composer
On this page you can find all versions of the php package patr1k/phenum. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download patr1k/phenum
More information about patr1k/phenum
Files in patr1k/phenum
Download patr1k/phenum
More information about patr1k/phenum
Files in patr1k/phenum
Vendor patr1k
Package phenum
Short Description PHP Enumerator
License MIT
Homepage http://github.com/patr1k/phenum
Package phenum
Short Description PHP Enumerator
License MIT
Homepage http://github.com/patr1k/phenum
Please rate this library. Is it a good library?
Informations about the package phenum
Phenum - PHP Enumerator as a Trait
How It Works
Unlike most enumerators which use an abstract class as a domain container, Phenum is a trait which can be attached to any class where the enumerated domain is expressed as constants.
Advantages
- By representing enums using scalar constants rather than objects, this approach is slightly faster and more memory efficient than OO-based approaches.
- Enums are more tightly coupled with the class to which they belong, which can make the code easier to read for developers who are new to your project.
Disadvantages
- Without using objects to represent enums, the auto-complete feature in your IDE won't know what the possible enum values are for a given domain. You would need to know which class defines the domain values, then begin typing the domain prefix to see the possible values.
Requirements
- PHP >= 5.6.0
License
MIT License see LICENSE file
All versions of phenum with dependencies
PHP Build Version
Package Version
Requires
php Version
>=5.6
The package patr1k/phenum contains the following files
Loading the files please wait ....