Skip to content

caugner/phpdotenvcache

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cache for PHP dotenv

A simple cached loader for PHP dotenv.

Build Status Code Climate Latest Stable Version License

Usage

First, install Composer.

curl -sS https://getcomposer.org/installer | php

Next, add phpdotenvcache:

php composer.phar require claas/phpdotenvcache

Then, include Composer's autoloader:

require 'vendor/autoload.php';

Finally, you can use the PHP dotenv cache:

$dotenv = new Dotenv\CachedDotenv();
$dotenv->load(__DIR__);
// Alternatively, only load to $_ENV or $_SERVER globals:
// $dotenv->loadToEnv(__DIR__);
// $dotenv->loadToServer(__DIR__);