Exemple #1
0
 /**
  * Setup the application with the default provider
  */
 protected function loadApplicationCore()
 {
     $autoloader = Autoloader::getInstance();
     $dependencies = new InjectionContainer();
     $providers = new ProviderRegistry($dependencies);
     $application = new Application($autoloader, $dependencies, $providers);
     $provider = $application->addProvider(SYSPATH . 'ee/EllisLab/ExpressionEngine', 'app.setup.php', 'ee');
     $provider->setConfigPath($this->getConfigPath());
     $dependencies->register('App', function ($di, $prefix = NULL) use($application) {
         if (isset($prefix)) {
             return $application->get($prefix);
         }
         return $application;
     });
     $this->legacy->getFacade()->set('di', $dependencies);
     return $application;
 }
Exemple #2
0
 /**
  * Register this provider's namespace
  */
 protected function registerNamespace()
 {
     $this->autoloader->addPrefix($this->getNamespace(), $this->path);
 }