PHP Classes

PHP Enumeration: Provide enumerated data type with constants

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in Bookmark in
  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 (6 years ago) RSS 2.0 feedNot enough user ratingsTotal: 287 All time: 6,785 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: 3468418 in United States United States
Week rank: 1752 Up209 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:287All time:6,785
 This week:0This week:1,550Up
 User Comments (1)  
Tiny very well coded class.
6 years ago (David Ferreira)