2017 © Pedro Peláez
 

library detectenv

A simple PHP class to detect environment depending on server name

image

proximitymad/detectenv

A simple PHP class to detect environment depending on server name

  • Tuesday, November 15, 2016
  • by proximity
  • Repository
  • 3 Watchers
  • 0 Stars
  • 107 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 4 Versions
  • 5 % Grown

The README.md

detectenv

Simple PHP Class to get environment depending on server name, (*1)

Installation

The preferred way to install this extension is through composer., (*2)

Either run, (*3)

php composer.phar require --prefer-dist proximitymad/detectenv "1.0.*"

or add, (*4)

"proximitymad/detectenv": "1.0.*"

to the require section of your composer.json file., (*5)

Usage

Once the extension is installed, simply use it in your code by :, (*6)

$hosts = [
    'mydevhost.dev'=>'dev',
    'mytesthost.com'=>'test',
    'myprodhost.com'=>'prod',
    'myHostName'=>'console',
];
$env = \proximitymad\detectenv\DetectEnv::get($hosts);

By default if no host is found it will return null, you can change the default host by adding the second parameter:, (*7)

$env = \proximitymad\detectenv\DetectEnv::get($hosts, 'prod');

The Versions

15/11 2016

dev-master

9999999-dev

A simple PHP class to detect environment depending on server name

  Sources   Download

The Requires

  • php >=5.4.0

 

The Development Requires

by n.vanderburg

15/11 2016

v1.0.2

1.0.2.0

A simple PHP class to detect environment depending on server name

  Sources   Download

The Requires

  • php >=5.4.0

 

The Development Requires

by n.vanderburg

08/11 2016

v1.0.1

1.0.1.0

A simple PHP class to detect environment depending on server name

  Sources   Download

The Requires

  • php >=5.4.0

 

The Development Requires

by n.vanderburg

07/11 2016

v1.0.0

1.0.0.0

A simple PHP class to detect environment depending on server name

  Sources   Download

The Requires

  • php >=5.4.0

 

The Development Requires

by n.vanderburg