PHPackages                             janisto/yii2-environment - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. janisto/yii2-environment

ArchivedYii2-extension[Utility &amp; Helpers](/categories/utility)

janisto/yii2-environment
========================

Environment class for Yii 2, used to set configuration for console and web apps depending on the server environment.

1.3.0(9y ago)2034.6k5[2 PRs](https://github.com/janisto/yii2-environment/pulls)3public domainPHPPHP &gt;=5.4.0

Since Oct 27Pushed 6y ago7 watchersCompare

[ Source](https://github.com/janisto/yii2-environment)[ Packagist](https://packagist.org/packages/janisto/yii2-environment)[ Docs](https://github.com/janisto/yii2-environment)[ RSS](/packages/janisto-yii2-environment/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (7)Used By (3)

Yii 2 Environment
=================

[](#yii-2-environment)

Environment class for Yii 2, used to set configuration for console and web apps depending on the server environment.

[![Software License](https://camo.githubusercontent.com/7c53331e1437898fc56852830e612a6a86871bf2de861562e9f753be21f91248/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d556e6c6963656e73652d626c75652e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/506d5a10a9f7bd827452fa6a98d9db93ec9a88f838fcc08207f66be8f0bb4633/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6a616e6973746f2f796969322d656e7669726f6e6d656e742f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/janisto/yii2-environment)[![Code Quality](https://camo.githubusercontent.com/581cdca0d8d17c9aab9260029e7158c3fe037388563f34cb3d2d490b10c25db2/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6a616e6973746f2f796969322d656e7669726f6e6d656e742e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/janisto/yii2-environment)[![Code Coverage](https://camo.githubusercontent.com/579d6615347df9fbccfa269c275f9816ae93850f17b4621c91dcc309188e1038/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f6a616e6973746f2f796969322d656e7669726f6e6d656e742e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/janisto/yii2-environment)[![Packagist Version](https://camo.githubusercontent.com/9506557a995a732482b653e4afbe0e69463bf258d15743efeb2ebb583addeec2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a616e6973746f2f796969322d656e7669726f6e6d656e742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/janisto/yii2-environment)[![Total Downloads](https://camo.githubusercontent.com/67be81f3190f1985ae3f8f611d641990363696c72c1bc52797ef9eae5ff6304f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6a616e6973746f2f796969322d656e7669726f6e6d656e742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/janisto/yii2-environment)

Installation
------------

[](#installation)

If you do not have [Composer](http://getcomposer.org/), you may install it by following the instructions at [getcomposer.org](http://getcomposer.org/doc/00-intro.md#installation-nix).

You can then install this package using the following command:

```
php composer.phar require "janisto/yii2-environment" "*"
```

or add

```
"janisto/yii2-environment": "*"
```

to the require section of your application's `composer.json` file.

Usage
-----

[](#usage)

### web index.php

[](#web-indexphp)

```
