2017 © Pedro Peláez
 

library detectenv

A simple PHP class to detect environment depending on server name

image

proximity/detectenv

A simple PHP class to detect environment depending on server name

  • Tuesday, November 8, 2016
  • by nilsburg
  • Repository
  • 1 Watchers
  • 0 Stars
  • 24 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 6 Versions
  • 0 % 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 proximity/detectenv "1.0.*"

or add, (*4)

"proximity/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',
];
$env = \proximity\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 = \proximity\detectenv\DetectEnv::get($hosts, 'prod');

The Versions

08/11 2016

dev-travis

dev-travis

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

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

07/11 2016

v1.0.3

1.0.3.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

17/10 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

 

by n.vanderburg

03/10 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

 

by n.vanderburg

03/10 2016

v1.0

1.0.0.0

A simple PHP class to detect environment depending on server name

  Sources   Download

The Requires

  • php >=5.4.0

 

by n.vanderburg