Source for file Configurator.php
Documentation is available at Configurator.php
- 1: <?php
- 3: /**
- 4: * Nette Framework
- 5: *
- 6: * Copyright (c) 2004, 2009 David Grudl (http://davidgrudl.com)
- 7: *
- 8: * This source file is subject to the "Nette license" that is bundled
- 9: * with this package in the file license.txt.
- 10: *
- 11: * For more information please see https://nette.org
- 12: *
- 19: */
- 27: /**
- 28: * Nette\Environment helper.
- 29: *
- 33: */
- 35: {
- 51: /**
- 52: * Detect environment mode.
- 55: */
- 57: {
- 60: // environment name autodetection
- 66: }
- 69: // detects production mode by server IP address
- 76: // 10.0.0.0/8 Private network
- 77: // 127.0.0.0/8 Loopback
- 78: // 169.254.0.0/16 & ::1 Link-Local
- 79: // 172.16.0.0/12 Private network
- 80: // 192.168.0.0/16 Private network
- 86: }
- 89: // Determines whether the debugger is active
- 95: // function_exists('DebugBreak');
- 96: }
- 101: default:
- 102: // unknown mode
- 104: }
- 105: }
- 109: /**
- 110: * Loads global configuration from file and process it.
- 113: */
- 115: {
- 125: }
- 128: }
- 130: // process environment variables
- 134: }
- 135: }
- 139: // process services
- 144: }
- 145: }
- 147: // check temporary directory - TODO: discuss
- 148: /*
- 149: $dir = Environment::getVariable('tempDir');
- 150: if ($dir && !(is_dir($dir) && is_writable($dir))) {
- 151: trigger_error("Temporary directory '$dir' is not writable", E_USER_NOTICE);
- 152: }
- 153: */
- 155: // process ini settings
- 159: }
- 166: }
- 193: default:
- 196: }
- 197: }
- 198: }
- 199: }
- 200: }
- 202: // define constants
- 206: }
- 207: }
- 209: // set modes
- 213: }
- 214: }
- 218: }
- 222: /********************* service factories ****************d*g**/
- 226: /**
- 227: * Get initial instance of service locator.
- 229: */
- 231: {
- 235: }
- 237: }
- 241: /**
- 243: */
- 245: {
- 247: }
- 249: }