Magestead\Installers\Project::create PHP Метод

create() публичный статический Метод

public static create ( array $options, array $config, $projectPath, $output ) : Magento2Project | MagentoProject
$options array
$config array
$projectPath
$output
Результат Magento2Project | MagentoProject
    public static function create(array $options, array $config, $projectPath, $output)
    {
        switch ($options['app']) {
            case "magento":
                return new MagentoProject($options, $config, $projectPath, $output);
                break;
            case "magento2":
                return new Magento2Project($options, $config, $projectPath, $output);
                break;
        }
    }

Usage Example

Пример #1
0
 /**
  * @param InputInterface $input
  * @param OutputInterface $output
  * @return \Magestead\Installers\Magento2Project|\Magestead\Installers\MagentoProject
  * @throws ExistingProjectException
  */
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $project = $this->setProject($input);
     $helper = $this->getHelper('question');
     $options = (new Options($helper, $input, $output, $project))->getAllOptions();
     $this->setupProject($output, $options);
     $output->writeln('<info>Spinning up your custom box</info>');
     new ProcessCommand('vagrant up', $this->_projectPath, $output);
     return Project::create($options, $this->_msConfig, $this->_projectPath, $output);
 }
Project