public function registerPlugins() {
		
		if($this->plugins) {
			foreach($this->plugins as $plugin) {
				$this->eventDispatcher->removeSubscriber($plugin);
			}
		}

		$this->plugins = array();
		
		// initialize plugins (if configured)
		
		if($this->config->plugins) {

			foreach(array_keys($this->config->plugins) as $pluginId) {
				$this->plugins[] = $this->initializePlugin($pluginId);
			}

		}

		return $this; 

	}
public function registerPlugins() {
		
		if($this->plugins) {
			foreach($this->plugins as $plugin) {
				$this->eventDispatcher->removeSubscriber($plugin);
			}
		}

		$this->plugins = array();
		
		// initialize plugins (if configured)
		
		if($this->config->plugins) {

			foreach(array_keys($this->config->plugins) as $pluginId) {
				$this->plugins[] = $this->initializePlugin($pluginId);
			}

		}

		return $this; 

	}
public function registerPlugins ( ) { if ( $ this -> plugins ) { foreach ( $ this -> plugins as $ plugin ) { $ this -> eventDispatcher -> removeSubscriber ( $ plugin ) ; } } $ this -> plugins = array ( ) ; // initialize plugins (if configured) if ( $ this -> config -> plugins ) { foreach ( array_keys ( $ this -> config -> plugins ) as $ pluginId ) { $ this -> plugins [ ] = $ this -> initializePlugin ( $ pluginId ) ; } } return $ this ; }
Unregister all previously registered plugins.

read plugin configuration from Config
and register all configured plugins

@return Application
@throws ApplicationException
Unregister all previously registered plugins .