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; 

	}