Download the PHP package juanchosl/envvars without Composer
On this page you can find all versions of the php package juanchosl/envvars. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download juanchosl/envvars
More information about juanchosl/envvars
Files in juanchosl/envvars
Package envvars
Short Description A small, lightweight utility to read ENV files and append his content to environment variables
License MIT
Homepage https://github.com/JuanchoSL/EnvVars
Informations about the package envvars
EnvVars
Description
A small, lightweight utility to read ENV files and append his content to environment variables.
This is a test project in order to check how works the composer installation directly from GitHub
Install
How to use it
Load composer autoload and use the JuanchoSL\EnvVars\EnvVars class, with abstract read method you can pass it the absolute file path or the dir path where the .ENV file are placed, the content has been putted into $_ENV superglobal or you can use getenv(ENV_VAR_NAME) instead
Initialize
Or
Add more files
Now, you can parse more files with new env vars in order to add to scope
Call vars
Or
Type of vars into .env file
You can use as values for your variables:
- fixed values
- variable from other env settings
- strings and functions of php than can be evaluated
Literals
Variables
Yo can use other env var name as content for set a nev environment variable. The order is not strict for reuse static values into env vars, the system parse and set first the literal variables, then the dynamic content, the var as value is then available. Pay attention to put the variable in the correct format, start with a dollar and put the name of the key to search into brackets
Evaluations
The system can parse and evaluate native functions in order to solve complex values. Pay attention to put the strign to evaluate into doble quotes and finish with a semicolon
OR
All versions of envvars with dependencies
ext-mbstring Version *
ext-fileinfo Version *
juanchosl/exceptions Version ^1.0