PHP Classes

PHP Enum Data Type: Generate a enumeration class for a given namespace

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
StarStarStar 43%Total: 454 This week: 1All time: 6,146 This week: 36Up
Version License PHP version Categories
enumerator 3.0.1Free for non-comm...5.3PHP 5, Data types, Code Generation
Description 

Author

This class can generate a enumeration class for a given namespace.

It can generate code for a enumeration class from a given list of enumerated values and the respective names.

The class extends SplEnum if available, or emulates it with custom base class.

The generated class can be defigned under a specific namespace.

The default value of the enumeration can also be configured.

Innovation Award
PHP Programming Innovation award nominee
April 2013
Number 2
Enumerated data types can be implemented in PHP using the SplEnum class.

This class can generate enumerated data type classes that extend SplEnum class but are defined within a given namespace.

Manuel Lemos
Picture of Asher Wolfstein
  Performance   Level  
Name: Asher Wolfstein <contact>
Classes: 15 packages by
Country: United States United States
Age: 41
All time rank: 1121164 in United States United States
Week rank: 49 Up7 in United States United States Up
Innovation award
Innovation award
Nominee: 5x

  Files folder image Files (11)  
File Role Description
Files folder imageFalcraft (2 directories)
Files folder imagesrc (1 directory)
Files folder imagetests (1 directory)
Accessible without login Plain text file composer.json Conf. Composer File
Accessible without login Plain text file LICENSE.txt Lic. License (MIT)
Accessible without login Plain text file phpunit.xml Test Unit Testing
Accessible without login Plain text file README.txt Doc. README

  Files folder image Files (11)  /  Falcraft  
File Role Description
Files folder imageData (1 directory)
Files folder imagetests (1 directory)

  Files folder image Files (11)  /  Falcraft  /  Data  
File Role Description
Files folder imageTypes (1 file)

  Files folder image Files (11)  /  Falcraft  /  Data  /  Types  
File Role Description
  Plain text file Enumeration.php Class The enum generator class

  Files folder image Files (11)  /  Falcraft  /  tests  
File Role Description
Files folder imageData (1 directory)

  Files folder image Files (11)  /  Falcraft  /  tests  /  Data  
File Role Description
Files folder imageTypes (1 file)

  Files folder image Files (11)  /  Falcraft  /  tests  /  Data  /  Types  
File Role Description
  Accessible without login Plain text file Enumeration.php Example Test Script

  Files folder image Files (11)  /  src  
File Role Description
Files folder imagePhabstractic (1 directory)

  Files folder image Files (11)  /  src  /  Phabstractic  
File Role Description
Files folder imageData (1 directory)

  Files folder image Files (11)  /  src  /  Phabstractic  /  Data  
File Role Description
Files folder imageTypes (1 file, 1 directory)

  Files folder image Files (11)  /  src  /  Phabstractic  /  Data  /  Types  
File Role Description
Files folder imageException (3 files)
  Plain text file Enumeration.php Class Main Class

  Files folder image Files (11)  /  src  /  Phabstractic  /  Data  /  Types  /  Exception  
File Role Description
  Plain text file CodeGenerationException.php Class Local Exception Class
  Plain text file ExceptionInterface.php Class Local Exception Class
  Plain text file RuntimeException.php Class Local Exception Class

  Files folder image Files (11)  /  tests  
File Role Description
Files folder imagePhabstractic (1 directory)

  Files folder image Files (11)  /  tests  /  Phabstractic  
File Role Description
Files folder imageData (1 directory)

  Files folder image Files (11)  /  tests  /  Phabstractic  /  Data  
File Role Description
Files folder imageTypes (1 file)

  Files folder image Files (11)  /  tests  /  Phabstractic  /  Data  /  Types  
File Role Description
  Accessible without login Plain text file Enumeration.php Test Unit Testing

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 Reuses Unique User Downloads Download Rankings  
 0%1
Total:454
This week:1
All time:6,146
This week:36Up
 User Ratings  
 
 All time
Utility:75%StarStarStarStar
Consistency:58%StarStarStar
Documentation:-
Examples:-
Tests:-
Videos:-
Overall:43%StarStarStar
Rank:3562