Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
WebApiApplication.php
Go to the documentation of this file.
1 <?php
6 namespace Magento\TestFramework;
7 
14 {
18  public function run()
19  {
20  throw new \Exception(
21  "Can't start application: purpose of Web API Application is to use classes and models from the application"
22  . " and don't run it"
23  );
24  }
25 
29  public function install($cleanup)
30  {
31  if ($cleanup) {
32  $this->cleanup();
33  }
34 
35  $installOptions = $this->getInstallConfig();
36 
37  /* Install application */
38  if ($installOptions) {
39  $installCmd = 'php -f ' . BP . '/bin/magento setup:install -vvv';
40  $installArgs = [];
41  foreach ($installOptions as $optionName => $optionValue) {
42  if (is_bool($optionValue)) {
43  if (true === $optionValue) {
44  $installCmd .= " --$optionName";
45  }
46  continue;
47  }
48  if (!empty($optionValue)) {
49  $installCmd .= " --$optionName=%s";
50  $installArgs[] = $optionValue;
51  }
52  }
53  $this->_shell->execute($installCmd, $installArgs);
54  }
55  }
56 
62  protected function getCustomDirs()
63  {
64  return [];
65  }
66 }
const BP
Definition: autoload.php:14