PHP Classes

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-05-03 (21 days ago) RSS 2.0 feedNot enough user ratingsTotal: 153 This week: 81All time: 8,659 This week: 3Up
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
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
Name: Steven Hoyt <contact>
Classes: 1 package by
Country: United States United States
Age: ???
All time rank: 4094462 in United States United States
Week rank: 4 Up2 in United States United States Up
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  
This week:81
All time:8,659
This week:3Up