Environment.php (435B)
1 <?php 2 3 /** 4 * Class Environment 5 * 6 * Extremely simple way to get the environment, everywhere inside your application. 7 * Extend this the way you want. 8 */ 9 class Environment 10 { 11 public static function get() 12 { 13 // if APPLICATION_ENV constant exists (set in Apache configs) 14 // then return content of APPLICATION_ENV 15 // else return "development" 16 return (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : "development"); 17 } 18 }