|Ratings|| ||Unique User Downloads|| ||Download Rankings|
|Not enough user ratings||Total: 149 This week: 1||All time: 9,021 This week: 491|
This class can dynamically define PHP constant values.
It can set one or more values for constants and generates a PHP script that will load those values and set them as constants before they are needed.
This class (GGG\Config\Predefiner) is a simple package to quickly and dynamically set PHP constants.
composer require gavinggordon/predefiner
include_once( __DIR__ . '/vendor/autoload.php' );
$predefiner = new \GGG\Config\Predefiner();
$predefiner->set( ['API_KEY' => 'abc123def456hij789klm0'] );
// Result: 'abc123def456hij789klm0';
If you have any issues at all, please post your findings in the issues page at https://github.com/gavinggordon/predefiner/issues.
This package utilizes the MIT License.
||Applications that use this package
No pages of applications that use this class were specified.
If you know an application of this package, send a message to the author to add a link here.
||Other classes that need this package
||Why it is needed
|PHP Constant Groups
||It is required, in order to dynamically set definitions for keywords used as constants.