/**
  * Initialisiert bei jedem Request den Datenbankadapter
  */
 public function bootstrap()
 {
     $registry = Dragon_Application_Registry::getInstance();
     $configDatabase = new Dragon_Application_Config('dragonx/storage/database');
     if (isset($configDatabase->adapter)) {
         $registry->setCallback('Zend_Db_Adapter', function () use($configDatabase) {
             return Zend_Db::factory($configDatabase->adapter, $configDatabase->config);
         });
     } else {
         $configDatabases = $configDatabase;
         foreach ($configDatabases as $storagekey => $configDatabase) {
             $registry->setCallback($storagekey, function () use($configDatabase) {
                 return Zend_Db::factory($configDatabase->adapter, $configDatabase->config);
             });
         }
     }
 }
 /**
  * Initialisiert bei jedem Request die Storage Engine
  */
 public function bootstrap()
 {
     $registry = Dragon_Application_Registry::getInstance();
     $configEngine = new Dragon_Application_Config('dragonx/storage/engine');
     if (isset($configEngine->engine)) {
         $registry->setCallback('DragonX_Storage_Engine', function () use($configEngine) {
             $callback = $configEngine->engine;
             return $callback();
         });
     } else {
         $configEngines = $configEngine;
         foreach ($configEngines as $storagekey => $configEngine) {
             $registry->setCallback($storagekey, function () use($configEngine) {
                 $callback = $configEngine->engine;
                 return $callback();
             });
         }
     }
 }
 /**
  * Initialisiert die eigene Registry und setzt diese als Standardregistry
  * @return Dragon_Application_Application
  */
 public function initRegistry()
 {
     require 'Dragon/Application/Registry.php';
     Dragon_Application_Registry::setClassname('Dragon_Application_Registry');
     return $this;
 }