Skip to content

monsat/environment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 

Repository files navigation

Environment

This is a plugin / module of CakePHP2.x

Usage

Path

$ cd /full/path/to
$ ls
www.example.com
$ cd www.example.com
$ ls
lib app
  1. cd app/Plugin
  2. git clone git://github.com/monsat/environment.git Environment
  3. Edit like this on your APP/Config/bootstrap.php
# APP/Config/bootstrap.php

// load plugin
CakePlugin::load('Environment');

// load Environment class
App::import('Lib', 'Environment.Environment');

// setting example
Environment::initialize(array(
  'Production' => array('example.info', 'www.example.info'),
  'Develop' => array('dev.www.example.info'),
));
if (Environment::is('Production')) {
  Configure::write('debug', 0);
}

Return True if your basename(ROOT) is 'example.info' or 'www.example.info'

Optional

check your basename(APP) instead of basename(ROOT)

Environment::$constant = 'APP';

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages