initialize() public method

Initialize deployer in project
public initialize ( string $template, string $directory, string $file = 'deploy.php' ) : string
$template string
$directory string
$file string
return string The configuration file path
Ejemplo n.º 1
0
 /**
  * {@inheritDoc}
  */
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $template = $input->getArgument('template');
     $directory = $input->getOption('directory');
     $file = $input->getOption('filename');
     $filePath = $this->initializer->initialize($template, $directory, $file);
     $output->writeln(sprintf('<comment>Successfully create deployer configuration: <info>%s</info></comment>', $filePath));
 }
 /**
  * {@inheritDoc}
  */
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $template = $input->getArgument('template');
     $directory = $input->getOption('directory');
     $file = $input->getOption('filename');
     if ($template === null) {
         $helper = $this->getHelper('question');
         $question = new ChoiceQuestion('Please select your project type (defaults to common):', $this->availableTemplates, 0);
         $question->setErrorMessage('Color %s is invalid.');
         $template = $helper->ask($input, $output, $question);
     }
     $filePath = $this->initializer->initialize($template, $directory, $file);
     $output->writeln(sprintf('<comment>Successfully create deployer configuration: <info>%s</info></comment>', $filePath));
 }