Login   Register  
PHP Classes
elePHPant
Icontem

Simple Enumeration: Implement enumerated types using arrays

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Info   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2007-10-16 (7 years ago) RSS 2.0 feedNot yet rated by the usersTotal: 1,418 This week: 1All time: 2,564 This week: 1,398Up
Version License PHP version Categories  
enum 1.0BSD License3.0Data types
Description Author  

This class can be used to implement enumerated types using PHP arrays.

It takes an arrays of strings or numbers to be used as names of the enumerated type entries.

The class can check whether a string or number is one of the possible enumerated values and return the respective enumerated value.

It can also return the number of enumerated values and display those values.

Picture of Ellery Leung
Name: Ellery Leung <contact>
Classes: 6 packages by
Country: Hong Kong Hong Kong
Age: ???
All time rank: 3201 in Hong Kong Hong Kong
Week rank: 444 Down2 in Hong Kong Hong Kong Down

  Files folder image Files  
File Role Description
Accessible without login Plain text file example.php Example Example file
Plain text file SimpleEnum.class.php Class Core class

 Version Control Unique User Downloads Download Rankings  
 0%Total:1,418All time:2,564
 This week:1This week:1,398Up