lib/base/BaseDeploy.class.php
protected function listFilesToRename($remote_host, $remote_dir)
	{
		if (!isset($this->files_to_rename["$remote_host-$remote_dir"]))
		{
			$target_files_to_move = array();

			// doelspecifieke files hernoemen
			if (!empty($this->target_specific_files))
			{
				foreach ($this->target_specific_files as $filepath)
				{
					$ext = pathinfo($filepath, PATHINFO_EXTENSION);

					if (isset($target_files_to_move[$filepath]))
					{
						$target_filepath = str_replace(".$ext", ".{$this->target}.$ext", $target_files_to_move[$filepath]);
					}
					else
					{
						$target_filepath = str_replace(".$ext", ".{$this->target}.$ext", $filepath);
					}

					$target_files_to_move[$filepath] = $target_filepath;
				}
			}

			// controleren of alle files bestaan
			if (!empty($target_files_to_move))
			{
				foreach ($target_files_to_move as $current_filepath)
				{
					if (!file_exists($current_filepath))
					{
						throw new DeployException("$current_filepath does not exist");
					}
				}
			}

			$this->files_to_rename["$remote_host-$remote_dir"] = $target_files_to_move;
		}

		return $this->files_to_rename["$remote_host-$remote_dir"];
	}
protected function listFilesToRename($remote_host, $remote_dir)
	{
		if (!isset($this->files_to_rename["$remote_host-$remote_dir"]))
		{
			$target_files_to_move = array();

			// doelspecifieke files hernoemen
			if (!empty($this->target_specific_files))
			{
				foreach ($this->target_specific_files as $filepath)
				{
					$ext = pathinfo($filepath, PATHINFO_EXTENSION);

					if (isset($target_files_to_move[$filepath]))
					{
						$target_filepath = str_replace(".$ext", ".{$this->target}.$ext", $target_files_to_move[$filepath]);
					}
					else
					{
						$target_filepath = str_replace(".$ext", ".{$this->target}.$ext", $filepath);
					}

					$target_files_to_move[$filepath] = $target_filepath;
				}
			}

			// controleren of alle files bestaan
			if (!empty($target_files_to_move))
			{
				foreach ($target_files_to_move as $current_filepath)
				{
					if (!file_exists($current_filepath))
					{
						throw new DeployException("$current_filepath does not exist");
					}
				}
			}

			$this->files_to_rename["$remote_host-$remote_dir"] = $target_files_to_move;
		}

		return $this->files_to_rename["$remote_host-$remote_dir"];
	}
protected function listFilesToRename ( $ remote_host , $ remote_dir ) { if ( ! isset ( $ this -> files_to_rename [ "$remote_host-$remote_dir" ] ) ) { $ target_files_to_move = array ( ) ; // doelspecifieke files hernoemen if ( ! empty ( $ this -> target_specific_files ) ) { foreach ( $ this -> target_specific_files as $ filepath ) { $ ext = pathinfo ( $ filepath , PATHINFO_EXTENSION ) ; if ( isset ( $ target_files_to_move [ $ filepath ] ) ) { $ target_filepath = str_replace ( ".$ext" , ".{$this->target}.$ext" , $ target_files_to_move [ $ filepath ] ) ; } else { $ target_filepath = str_replace ( ".$ext" , ".{$this->target}.$ext" , $ filepath ) ; } $ target_files_to_move [ $ filepath ] = $ target_filepath ; } } // controleren of alle files bestaan if ( ! empty ( $ target_files_to_move ) ) { foreach ( $ target_files_to_move as $ current_filepath ) { if ( ! file_exists ( $ current_filepath ) ) { throw new DeployException ( "$current_filepath does not exist" ) ; } } } $ this -> files_to_rename [ "$remote_host-$remote_dir" ] = $ target_files_to_move ; } return $ this -> files_to_rename [ "$remote_host-$remote_dir" ] ; }
Maakt een lijst van de files die specifiek zijn voor een clusterrol of doel en op de doelserver hernoemd moeten worden

@param string $remote_host
@param string $remote_dir
@throws DeployException
@return array
Maakt een lijst van de files die specifiek zijn voor een clusterrol of doel en op de doelserver hernoemd moeten worden