/** * get config * * @param null $path * @param bool $ignoreDisabled * @param null $default * @return array|null */ public function getConfig($path = null, $ignoreDisabled = true, $default = null) { if (is_null($this->config)) { $config = $this->reader->read(); $this->config = isset($config[$this->rootNode]) ? $config[$this->rootNode] : []; unset($this->config['noNamespaceSchemaLocation']); } if (is_null($path)) { if ($ignoreDisabled) { return $this->getEnabledConfig(); } return $this->config; } $parts = explode('/', $path); if ($ignoreDisabled) { $config = $this->getEnabledConfig(); } else { $config = $this->config; } foreach ($parts as $part) { if (isset($config[$part])) { $config = $config[$part]; } else { return $default; } } return $config; }
/** * {@inheritdoc} */ protected function execute(InputInterface $input, OutputInterface $output) { // If the docker-compose.yml file exists, then start containers. if ($this->fs->exists($this->projectPath . '/docker-compose.yml')) { $this->stdOut->writeln("<info>Docker compose initiated, starting containers. Run docker:rebuild to rebuild."); return $this->getApplication()->find('docker:up')->run($input, $output); } $this->getApplication()->find('docker:rebuild')->run($input, $output); sleep(5); $this->getApplication()->find('platform:db-sync')->run($input, $output); }