public static function initiate($siteRoot, $path, $customPath) { throw new One_Exception_Deprecated('do your own bootstrapping, dude'); // Register the autoloader One_Loader::register(); One_Config::getInstance()->setUrl($siteRoot)->setCustomPath($customPath)->setUserStore('mysql')->setTemplater(new One_Template_Adapter_NanoPretend()); // define( 'ONETEMPLATER', 'nano'); // $tmp = $path . DIRECTORY_SEPARATOR . 'nano' . DIRECTORY_SEPARATOR; // define( 'ONE_SCRIPT_PATH', $tmp ); // define( 'ONE_SCRIPT_CUSTOM_PATH', $customPath . DIRECTORY_SEPARATOR . 'nano' ); // // require_once( $tmp . 'tools' . DIRECTORY_SEPARATOR . 'autoload.php' ); require_once ONE_LIB_PATH . '/tools.php'; }
public static function bootstrap($oneLibFolder, $oneCustomFolder) { // Step 1: setup the basic configuration require_once $oneLibFolder . 'core/config.php'; One_Config::set('locator.root', '{' . $oneCustomFolder . '*,' . $oneLibFolder . '*}/'); // Step 2: register the autoloader require_once $oneLibFolder . 'core/loader.php'; One_Loader::register($oneLibFolder, $oneCustomFolder); // Step 3: load extensions One_Config::loadExtensions(); One_Config::callExtensions('afterInitialise'); // Step 4: load the main One class require_once $oneLibFolder . 'core/one_tbd.php'; }