Elgg  Version 6.3
PhinxWrapper.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Elgg\Upgrade;
4 
6 use Phinx\Wrapper\TextWrapper;
7 use Symfony\Component\Console\Input\ArrayInput;
8 
15 class PhinxWrapper extends TextWrapper {
16 
20  protected function executeRun(array $command): string {
21  if (!Application::isCli()) {
22  return parent::executeRun($command);
23  }
24 
25  $elgg_application = Application::getInstance();
26  if ($elgg_application->internal_services->config->testing_mode) {
27  // PHPUnit testing
28  return parent::executeRun($command);
29  }
30 
31  // need to initialize input/output stream
32  $cli_application = $elgg_application->internal_services->cli;
33 
34  $this->exitCode = $this->app->doRun(new ArrayInput($command), $elgg_application->internal_services->cli_output);
35 
36  return '';
37  }
38 }
Load, boot, and implement a front controller for an Elgg application.
Definition: Application.php:48
static getInstance()
Get the global Application instance.
Definition: Application.php:91
Elgg implementation of the Phinx Text Wrapper to ensure the correct OutputInterface.
executeRun(array $command)
{}
if(parse_url(elgg_get_site_url(), PHP_URL_PATH) !=='/') if(file_exists(elgg_get_root_path() . 'robots.txt'))
Set robots.txt.
Definition: robots.php:10