2017 © Pedro Peláez
 

cakephp-plugin cakephp-environment

CakePHP Environment Plugn. The configuration switching library by filebase.

image

nojimage/cakephp-environment

CakePHP Environment Plugn. The configuration switching library by filebase.

  • Monday, February 3, 2014
  • by nojimage
  • Repository
  • 3 Watchers
  • 12 Stars
  • 24,095 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 4 Forks
  • 0 Open issues
  • 2 Versions
  • 6 % Grown

The README.md

CakePHP Environment Plugn

The configuration switching library by filebase., (*1)

Copyright 2014, ELASTIC Consultants Inc. (http://elasticconsultants.com), (*2)

Build Status, (*3)

Installation

git clone, (*4)

git clone http://github.com/nojimage/cakephp-environment app/Plugin/Environment

or use composer, (*5)

composer require nojimage/cakephp-environment:dev-master

How to Setup

1. Create env file dir

Create app/Config/env direcotry., (*6)

mkdir app/Config/env

2. Create each environments configuration files

Create dirs, (*7)

mkdir app/Config/development app/Config/staging app/Config/production

and create each environments bootstrap file., (*8)

vi app/Config/development/bootstrap.php
vi app/Config/staging/bootstrap.php
vi app/Config/production/bootstrap.php

3. Setup APP/Config/bootstrap.php

in bootstrap.php, (*9)

CakePlugin::load('Environment');
App::uses('Environment', 'Environment.Lib');
Environment::load(); // check env and loading each env bootstrap.php

How to switching environment

Create file in env dir., (*10)

switch to development:, (*11)

rm app/Config/env/* && touch app/Config/env/development

switch to production:, (*12)

rm app/Config/env/* && touch app/Config/env/production

Usage

Please see Wiki pages., (*13)

License

Licensed under The MIT License. Redistributions of files must retain the above copyright notice., (*14)

Copyright 2014, ELASTIC Consultants Inc. (http://elasticconsultants.com), (*15)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:, (*16)

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software., (*17)

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE., (*18)

The Versions

03/02 2014

dev-master

9999999-dev https://github.com/nojimage/cakephp-environment

CakePHP Environment Plugn. The configuration switching library by filebase.

  Sources   Download

MIT

The Requires

 

cakephp environment

17/01 2014

1.0.0

1.0.0.0 https://github.com/nojimage/cakephp-environment

CakePHP Environment Plugn. The configuration switching library by filebase.

  Sources   Download

MIT

The Requires

 

cakephp environment