public function initialize($template, $directory, $file = 'deploy.php')
{
if (!isset($this->templates[$template])) {
throw TemplateNotFoundException::create($template, array_keys($this->templates));
}
$this->checkDirectoryBeforeInitialize($directory);
$this->checkFileBeforeInitialize($directory, $file);
$filePath = $directory . '/' . $file;
$this->templates[$template]->initialize($filePath);
return $filePath;
}