PHP Classes
elePHPant
Icontem

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    
Last Updated Ratings Unique User Downloads Download Rankings
2008-08-07 (8 years ago) RSS 2.0 feedNot enough user ratingsTotal: 287 All time: 7,073 This week: 1,550Up
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: 3593428 in United States United States
Week rank: 1357 Up141 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:287
This week:0
All time:7,073
This week:1,550Up
User Comments (1)
Tiny very well coded class.
8 years ago (David Ferreira)
55%StarStarStar