PHP Classes

PHP Enumeration: Provide enumerated data type with constants

Recommend this page to a friend!
  Info   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 290 This week: 1All time: 7,498 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
Age: ???
All time rank: 3850500 in United States United States
Week rank: 416 Up46 in United States United States Up

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

 Version Control Unique User Downloads Download Rankings  
 0%
Total:290
This week:1
All time:7,498
This week:560Up
User Comments (1)
Tiny very well coded class.
15 years ago (David Ferreira)
55%StarStarStar