-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added composer.json, modified README
- Loading branch information
1 parent
8d1d923
commit ccae143
Showing
4 changed files
with
58 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/vendor/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,36 @@ | ||
# detectenv | ||
Simple PHP Class to get environment depende on server name | ||
|
||
Installation | ||
------------ | ||
|
||
The preferred way to install this extension is through [composer](http://getcomposer.org/download/). | ||
|
||
Either run | ||
|
||
``` | ||
php composer.phar require --prefer-dist proximity/detectenv "*" | ||
``` | ||
|
||
or add | ||
|
||
``` | ||
"proximity/detectenv": "*" | ||
``` | ||
|
||
to the require section of your `composer.json` file. | ||
|
||
|
||
Usage | ||
----- | ||
|
||
Once the extension is installed, simply use it in your code by : | ||
|
||
```php | ||
$hosts = [ | ||
'mydevhost.dev'=>'dev', | ||
'mytesthost.com'=>'test', | ||
'myprodhost.com'=>'prod', | ||
]; | ||
$env = \proximity\detectenv\DetectEnv::get($hosts); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"name": "proximity/detectenv", | ||
"description": "A simple PHP class to detect environment depending on server name", | ||
"type": "library", | ||
"require": { | ||
"php": ">=5.4.0" | ||
}, | ||
"authors": [ | ||
{ | ||
"name": "n.vanderburg", | ||
"email": "nvanderburg@proximity.es" | ||
} | ||
] | ||
} |