2017 © Pedro Peláez
 

library env

Environment class, used to set configuration depending on the server environment.

image

janisto/env

Environment class, used to set configuration depending on the server environment.

  • Thursday, May 26, 2016
  • by janisto
  • Repository
  • 1 Watchers
  • 1 Stars
  • 14 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

env

Environment class, used to set configuration depending on the server environment., (*1)

Software License Build Status Code Quality Code Coverage Packagist Version Total Downloads, (*2)

Installation

If you do not have Composer, you may install it by following the instructions at getcomposer.org., (*3)

You can then install this package using the following command:, (*4)

php composer.phar require "janisto/env" "*"

or add, (*5)

"janisto/env": "*"

to the require section of your application's composer.json file., (*6)

Usage

web index.php

<?php
require(dirname(__DIR__) . '/vendor/autoload.php');

$env = new \janisto\env\Environment(dirname(__DIR__) . '/config');
// $env->config // environment configuration array

or if you have multiple configuration locations, (*7)

<?php
require(dirname(__DIR__) . '/vendor/autoload.php');

$env = new \janisto\env\Environment([
    dirname(__DIR__) . '/common/config',
    dirname(__DIR__) . '/backend/config'
]);
// $env->config // environment configuration array

console cli.php

#!/usr/bin/env php
<?php

require(__DIR__ . '/vendor/autoload.php');

$env = new \janisto\env\Environment(__DIR__ . '/config');
// $env->config // environment configuration array

Use cli.php, (*8)

export APP_ENV='dev' && ./cli.php

Documentation

See examples/., (*9)

Contributing

Please see CONTRIBUTING for details., (*10)

Credits

License

Public domain. Please see License File for more information., (*11)

The Versions

26/05 2016

dev-master

9999999-dev https://github.com/janisto/env

Environment class, used to set configuration depending on the server environment.

  Sources   Download

public domain

The Requires

  • php >=5.4.0

 

The Development Requires

by Jani Mikkonen

configuration environment

25/05 2016

1.0.1

1.0.1.0 https://github.com/janisto/env

Environment class, used to set configuration depending on the server environment.

  Sources   Download

public domain

The Requires

  • php >=5.4.0

 

The Development Requires

by Jani Mikkonen

configuration environment

13/05 2016

1.0.0

1.0.0.0 https://github.com/janisto/env

Environment class, used to set configuration depending on the server environment.

  Sources   Download

public domain

The Requires

  • php >=5.4.0

 

The Development Requires

by Jani Mikkonen

configuration environment