示例#1
0
 /**
  * Constructor
  */
 public function __construct($extensionPath)
 {
     if (!(substr($extensionPath, -1) == DIRECTORY_SEPARATOR)) {
         $extensionPath .= DIRECTORY_SEPARATOR;
     }
     $this->_extensionPath = $extensionPath;
     OntoWiki_Module_Registry::reset();
     //OntoWiki_Module_Registry::getInstance()->resetInstance();
     $this->_moduleRegistry = OntoWiki_Module_Registry::getInstance();
     $this->_moduleRegistry->setExtensionPath($extensionPath);
     //TODO nessesary?
     Erfurt_Wrapper_Registry::reset();
     $this->_eventDispatcher = Erfurt_Event_Dispatcher::getInstance();
     // scan for extensions
     $this->_scanExtensionPath();
     // scan for translations
     $this->_scanTranslations();
     // register for event
     $dispatcher = Erfurt_Event_Dispatcher::getInstance();
     $dispatcher->register('onRouteShutdown', $this);
 }