PHP Classes

PHP Enumeration: Provide enumerated data type with constants

Recommend this page to a friend!
     
  Info   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 290 All time: 7,505 This week: 560Up
Version License PHP version Categories
enumeration 1.0GNU General Publi...5PHP 5, Data types
Description 

Author

This class can provide an enumerated data type using the class constant values.

It is a base class that needs to be extended by a sub-class that defines constant values.

Setting or getting the derived class variables with the same name as the constants, can set or get the values of the constants.

Picture of Jim Sierra
Name: Jim Sierra <contact>
Classes: 1 package by
Country: United States United States

  Files folder image Files (2)  
File Role Description
Plain text file Enumeration.class.php Class Parent Class
Accessible without login Plain text file Enumeration.test.php Example Use example

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:290
This week:0
All time:7,505
This week:560Up
User Comments (1)
Tiny very well coded class.
16 years ago (David Ferreira)
55%StarStarStar