Example #1
0
 public function testLoad()
 {
     FacadeLoader::register();
     $this->assertFalse(class_exists('CubexTestFacadeLoad'));
     FacadeLoader::addAlias('CubexTestFacadeLoad', '\\Cubex\\CubexException');
     $this->assertTrue(class_exists('CubexTestFacadeLoad'));
 }
Example #2
0
 /**
  * Boot Cubex, Setup Facades, & Service Providers
  */
 public function boot()
 {
     if ($this->_booted) {
         return null;
     }
     //Fix anything that hasnt been set by the projects bootstrap
     $this->prepareCubex();
     //Bind services
     $this->processConfiguration($this->getConfiguration());
     //Setup facades
     Facade::clearResolvedInstances();
     Facade::setFacadeApplication($this);
     FacadeLoader::register();
     //Setup Service Providers
     $serviceManager = new ServiceManager();
     $serviceManager->setCubex($this);
     $serviceManager->boot();
     $this->instance('service.manager', $serviceManager);
     $this->_booted = true;
 }