PHP Classes

Predefiner: Dynamically define PHP constant values

Recommend this page to a friend!
  Info   Documentation   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 154 All time: 9,043 This week: 206Up
Version License PHP version Categories
predefiner 1.0.1MIT/X Consortium ...5.4PHP 5, Tools, Text processing, Code G..., C...
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.

Picture of Gavin Gordon Markowski
  Performance   Level  
Innovation award
Innovation award
Nominee: 5x

 

Documentation

Predefiner

Build Status Packagist Version Github Release Usage License

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.


  Files folder image Files (10)  
File Role Description
Files folder imageconfig (2 files)
Files folder imagesrc (1 file)
Files folder imagetests (1 file)
Plain text file .scrutinizer.yml Data scrutinizer
Plain text file .travis.yml Data travis.ci
Plain text file composer.json Data composer file
Plain text file LICENSE.txt Doc. Documentation
Plain text file phpunit.xml Data phpunit file
Plain text file readme.md Doc. info and examples

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  
 100%1
Total:154
This week:0
All time:9,043
This week:206Up