PHP Classes
elePHPant
Icontem

Encapsulate PHP Constants in Class: Encapsulate several constants in the same class

Recommend this page to a friend!
  Info   View files Example   View files View files (6)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2019-06-25 (5 months ago) RSS 2.0 feedNot enough user ratingsTotal: 175 All time: 8,503 This week: 352Up
Version License PHP version Categories
abstractconstants 1.0GNU General Publi...5PHP 5, Language
Description Author

This class can encapsulate several constants in the same class.

It provides a base class that can store constant values in class variable.

Applications should extend this class to allow retrieving all constants defined in an class as an array.

Innovation Award
PHP Programming Innovation award nominee
April 2019
Number 9
Many classes need to define constant values, so they can have meaningful names for the values that they need to use.

This package makes that task easier by providing a base class that assigns values to constants from an array defined in a sub-class that needs to use those constants.

Manuel Lemos
  Performance   Level  
Name: Steven Hoyt <contact>
Classes: 1 package by
Country: United States United States
Innovation award
Innovation award
Nominee: 1x

 

  Files folder image Files  
File Role Description
Accessible without login Plain text file test.php Example Test script (demonstrate usage)
Plain text file application.class.php Class ApplicationClass (example caller class)
Plain text file paths.class.php Class Paths (example extending class)
Plain text file roles.class.php Class Roles (example extending class)
Plain text file abstract.constants.class.php Class AbstractConstants
Accessible without login Plain text file test.output.txt Output Sample output

 Version Control Unique User Downloads Download Rankings  
 0%
Total:175
This week:0
All time:8,503
This week:352Up