<?php function set_magic_quotes_runtime() { return false; } require LIBS_DIR . '/nette.min.php'; require LIBS_DIR . '/SQLiteStorage.php'; $loader = new NRobotLoader(); $loader->setCacheStorage(new SQLiteStorage()); $loader->addDirectory(APP_DIR); $loader->addDirectory(LIBS_DIR); $loader->addDirectory(WWW_DIR . '/require_modules'); $loader->addDirectory(WWW_DIR . '/classes'); $loader->register(); $config = NEnvironment::loadConfig(APP_DIR . '/config/config.neon');
static function createRobotLoader($options) { $loader = new NRobotLoader(); $loader->autoRebuild = isset($options['autoRebuild']) ? $options['autoRebuild'] : !NEnvironment::isProduction(); $loader->setCacheStorage(NEnvironment::getService('Nette\\Caching\\ICacheStorage')); if (isset($options['directory'])) { $loader->addDirectory($options['directory']); } else { foreach (array('appDir', 'libsDir') as $var) { if ($dir = NEnvironment::getVariable($var, NULL)) { $loader->addDirectory($dir); } } } $loader->register(); return $loader; }
static function createRobotLoader($options) { $loader = new NRobotLoader(); $loader->autoRebuild = !NEnvironment::isProduction(); $dirs = isset($options['directory']) ? $options['directory'] : array(NEnvironment::getVariable('appDir'), NEnvironment::getVariable('libsDir')); $loader->addDirectory($dirs); $loader->register(); return $loader; }