Ejemplo n.º 1
0
 function initializeGlobalState()
 {
     // load data in base.xml
     $base_xml_xpath = $this->loadBaseXML();
     $this->simulateMissingFunctions();
     if (!($settings = $this->loadConfiguration())) {
         // ini files are not set..
         // launch repair program!!
         die('STOP');
     }
     $this->initSession($settings);
     // initialize classes autoloading
     require_once SCRIPT_BASE . 'roxlauncher/autoload.plug.php';
     require_once SCRIPT_BASE . 'roxlauncher/classloader.php';
     $class_loader = new ClassLoader();
     AutoloadPlug::setCallback(array($class_loader, 'autoload'));
     spl_autoload_register(array('AutoloadPlug', 'autoload'), true, true);
     $this->loadRoxClasses($class_loader);
     $this->loadPTClasses($class_loader);
     require_once SCRIPT_BASE . 'pthacks/classes.php';
     Classes::set($class_loader);
     // ???
     PSurveillance::get();
     // $this->loadRoxClasses($class_loader);
     $this->loadPModules($class_loader);
     $this->loadPApps($class_loader);
     // TODO: fill with class names..
     $this->classes = array();
     // these two may actually kill the process
     $this->loadDefaults($base_xml_xpath, $settings);
     $this->checkEnvironment();
     // initialize global vars and global registry
     $this->_initPVars($settings);
     $this->_initBWGlobals($settings);
     PSurveillance::setPoint('base_loaded');
     // print_r($class_loader);
 }
Ejemplo n.º 2
0
 /**
  * Set the callback to be called when a new classname is requested.
  * The callback is assumed to do some "require_once" or similar,
  * but you are free to let it do something else.
  *
  * @param callback $callback
  */
 static function setCallback($callback)
 {
     self::$_callback = $callback;
 }