/**
  * Installs node components and returns next node.
  *
  * @param	string		$node
  * @return	PackageInstallationStep
  */
 public function install($node)
 {
     $nodes = $this->nodeBuilder->getNodeData($node);
     // invoke node-specific actions
     foreach ($nodes as $data) {
         $nodeData = unserialize($data['nodeData']);
         switch ($data['nodeType']) {
             case 'package':
                 $step = $this->installPackage($nodeData);
                 break;
             case 'pip':
                 $step = $this->executePIP($nodeData);
                 break;
             case 'optionalPackages':
                 $step = $this->selectOptionalPackages($node, $nodeData);
                 break;
             default:
                 die("Unknown node type: '" . $data['nodeType'] . "'");
                 break;
         }
         if ($step->splitNode()) {
             $this->nodeBuilder->cloneNode($node, $data['sequenceNo']);
             break;
         }
     }
     // mark node as completed
     $this->nodeBuilder->completeNode($node);
     // assign next node
     $node = $this->nodeBuilder->getNextNode($node);
     $step->setNode($node);
     // update options.inc.php and save localized package infos
     if ($node == '') {
         OptionEditor::resetCache();
         if ($this->action == 'install') {
             $this->saveLocalizedPackageInfos();
         }
     }
     return $step;
 }
	/**
	 * Installs node components and returns next node.
	 * 
	 * @param	string		$node
	 * @return	wcf\system\package\PackageInstallationStep
	 */
	public function install($node) {
		$nodes = $this->nodeBuilder->getNodeData($node);
		
		// invoke node-specific actions
		foreach ($nodes as $data) {
			$nodeData = unserialize($data['nodeData']);
			
			switch ($data['nodeType']) {
				case 'package':
					$step = $this->installPackage($nodeData);
				break;
				
				case 'pip':
					$step = $this->executePIP($nodeData);
				break;
				
				case 'optionalPackages':
					$step = $this->selectOptionalPackages($node, $nodeData);
				break;
				
				default:
					die("Unknown node type: '".$data['nodeType']."'");
				break;
			}
			
			if ($step->splitNode()) {
				$this->nodeBuilder->cloneNode($node, $data['sequenceNo']);
				break;
			}
		}
		
		// mark node as completed
		$this->nodeBuilder->completeNode($node);
		
		// assign next node
		$node = $this->nodeBuilder->getNextNode($node);
		$step->setNode($node);
		
		// perform post-install/update actions
		if ($node == '') {
			// update options.inc.php
			OptionEditor::resetCache();
			
			if ($this->action == 'install') {
				// save localized package infos
				$this->saveLocalizedPackageInfos();
				
				// remove all cache files after WCFSetup
				if (!PACKAGE_ID) {
					CacheHandler::getInstance()->flushAll();
				}
				
				// rebuild application paths
				ApplicationHandler::rebuild();
				ApplicationEditor::setup();
			}
			
			// remove template listener cache
			TemplateListenerCacheBuilder::getInstance()->reset();
			TemplateListenerCodeCacheBuilder::getInstance()->reset();
				
			// reset language cache
			LanguageFactory::getInstance()->clearCache();
			LanguageFactory::getInstance()->deleteLanguageCache();
			
			// reset stylesheets
			StyleHandler::resetStylesheets();
		}	
		
		if ($this->requireRestructureVersionTables) {
			$this->restructureVersionTables();
		}			
		
		return $step;
	}