/**
  * The constructor
  */
 function __construct()
 {
     $this->container = new \BearFramework\App\Container();
     $this->container->set('data', \BearCMS\Data::class);
     $this->container->set('currentTheme', \BearCMS\CurrentTheme::class);
     $this->container->set('currentUser', \BearCMS\CurrentUser::class);
 }
Exemple #2
0
 function __construct()
 {
     $this->container = new \BearFramework\App\Container();
     $this->container->set('addons', \BearCMS\Data\Addons::class);
     $this->container->set('blog', \BearCMS\Data\Blog::class);
     $this->container->set('pages', \BearCMS\Data\Pages::class);
     $this->container->set('settings', \BearCMS\Data\Settings::class);
     $this->container->set('themes', \BearCMS\Data\Themes::class);
     $this->container->set('users', \BearCMS\Data\Users::class);
 }
Exemple #3
0
 /**
  * The constructor
  * @throws \Exception
  */
 public function __construct()
 {
     if (self::$instance === null) {
         self::$instance =& $this;
     } else {
         throw new \Exception('App already constructed');
     }
     $this->container = new App\Container();
     $this->container->set('config', App\Config::class, ['SINGLETON']);
     $this->container->set('request', App\Request::class, ['SINGLETON']);
     $this->container->set('routes', App\Routes::class, ['SINGLETON']);
     $this->container->set('logger', App\Logger::class, ['SINGLETON']);
     $this->container->set('addons', App\Addons::class, ['SINGLETON']);
     $this->container->set('hooks', App\Hooks::class, ['SINGLETON']);
     $this->container->set('assets', App\Assets::class, ['SINGLETON']);
     $this->container->set('data', App\Data::class, ['SINGLETON']);
     $this->container->set('cache', App\Cache::class, ['SINGLETON']);
     $this->container->set('classes', App\Classes::class, ['SINGLETON']);
     $this->container->set('urls', App\Urls::class, ['SINGLETON']);
     $this->container->set('filesystem', App\Filesystem::class, ['SINGLETON']);
     $this->container->set('images', App\Images::class, ['SINGLETON']);
 }