Example #1
0
 /**
  * This constructor sets up session, pulls the current install wizard step and initializes the template
  *
  * @return void
  */
 public function __construct()
 {
     if (!Kohana::config('config.installer_enabled')) {
         throw new Exception('The installer has been administratively disabled. (You can re-enable it in Bluebox/config/config.php)');
     }
     Kohana::config_set('core.site_domain', Bluebox_Installer::guess_site_domain());
     skins::setSkin($this->template);
     parent::__construct();
     /**
      * TODO: Remove me when i18n is more stable
      */
     $this->session->set('lang', 'en');
     // Attempt to retrieve the current Step
     $this->currentStepKey = $this->session->get('installer.currentStepKey', 0);
     $this->currentStep = $this->steps[$this->currentStepKey];
     // If this step is before the environment test the disable logging because we dont know if
     // kohana has write permissions on logs/
     if ($this->currentStepKey > 1 && Kohana::config('core.log_threshold') == 0) {
         Kohana::config_set('core.log_threshold', $this->log_threshold);
     }
     // This is the default list of steps to run, modified to work with the wizard
     $this->pluginEvents = array('core' => Router::$controller, 'coreAction' => Router::$controller . '.' . $this->currentStep);
     if ($this->currentStep != 'finalize') {
         $this->_loadAllModules();
     } else {
         Bluebox_Core::bootstrapPackages(TRUE);
     }
 }
Example #2
0
 /**
  * Bootstrap our auto-loader to the system
  */
 public static function bootstrapCore()
 {
     // Load in the Bluebox_Core class if it is not already,
     if (!class_exists('Bluebox_Core')) {
         if ($filename = Kohana::find_file('libraries', 'Bluebox_Core')) {
             require $filename;
         } else {
             // if we cant find it then that is fatal
             kohana::log('error', 'Could not locate the core class!');
             die('Unable to locate the system core class');
         }
     }
     // Enable core doctrine autoloader for our models
     spl_autoload_register(array('Bluebox_Core', 'autoload'));
     spl_autoload_register(array('Bluebox_Core', 'autoloadLibraries'));
     Bluebox_Core::bootstrapPackages();
 }