public function initialize($template, $directory, $file = 'deploy.php', $params = [])
    {
        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, $params);

        return $filePath;
    }
public function initialize($template, $directory, $file = 'deploy.php', $params = [])
    {
        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, $params);

        return $filePath;
    }
public function initialize ( $ template , $ directory , $ file = 'deploy.php' , $ params = [ ] ) { 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 , $ params ) ; return $ filePath ; }
Initialize deployer in project

@param string $template
@param string $directory
@param string $file
@param array $params
@return string The configuration file path

@throws TemplateNotFoundException
Initialize deployer in project