Last Updated | | Ratings | | Unique User Downloads | | Download Rankings |
2017-02-01 (3 days ago)  | | Not enough user ratings | | Total: 129 This week: 26 | | All time: 8,412 This week: 38 |
|
Description | | Author |
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. | |
 |
|
Innovation award
 Nominee: 4x |
|
Details
Predefiner

Description
This class (GGG\Config\Predefiner) is a simple package to quickly and dynamically set PHP constants.
Usage
Installation
composer require gavinggordon/predefiner
Examples
Instantiation:
include_once( __DIR__ . '/vendor/autoload.php' );
$predefiner = new \GGG\Config\Predefiner();
Setting:
$predefiner->set( ['API_KEY' => 'abc123def456hij789klm0'] );
Initializing:
$predefiner->init();
echo API_KEY;
// Result: 'abc123def456hij789klm0';
Issues
If you have any issues at all, please post your findings in the issues page at https://github.com/gavinggordon/predefiner/issues.
License
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.