Exemplo n.º 1
0
	/**
	 * Gets "class behind Environment" configurator.
	 * @return Nette\Configurator
	 */
	public static function getConfigurator()
	{
		if (self::$configurator === NULL) {
			self::$configurator = Configurator::$instance ?: new Configurator;
		}
		return self::$configurator;
	}
Exemplo n.º 2
0
 /**
  * Gets "class behind Environment" configurator.
  * @return Configurator
  */
 public static function getConfigurator()
 {
     if (self::$configurator === NULL) {
         self::$configurator = new Configurator();
     }
     return self::$configurator;
 }
Exemplo n.º 3
0
 static function getConfigurator()
 {
     if (self::$configurator === NULL) {
         self::$configurator = new Nette\Config\Configurator();
         if (defined('TEMP_DIR')) {
             self::$configurator->setCacheDirectory(TEMP_DIR);
         }
         self::$createdAt = '?';
         foreach (debug_backtrace(FALSE) as $row) {
             if (isset($row['file']) && is_file($row['file']) && strpos($row['file'], NETTE_DIR . DIRECTORY_SEPARATOR) !== 0) {
                 self::$createdAt = "{$row['file']}:{$row['line']}";
                 break;
             }
         }
     }
     return self::$configurator;
 }