protected function execute(InputInterface $input, OutputInterface $output) { $this->recreateContainerWithWebEnvironment(); $this->initHostAndQueryString($input); if ($this->isTestModeEnabled()) { $indexFile = '/tests/PHPUnit/proxy/'; $this->resetDatabase(); } else { $indexFile = '/'; } $indexFile .= 'index.php'; if (!empty($_GET['pid'])) { $process = new Process($_GET['pid']); if ($process->hasFinished()) { return; } $process->startProcess(); } if ($input->getOption('superuser')) { StaticContainer::addDefinitions(array('observers.global' => \DI\add(array(array('Environment.bootstrapped', function () { Access::getInstance()->setSuperUserAccess(true); }))))); } require_once PIWIK_INCLUDE_PATH . $indexFile; if (!empty($process)) { $process->finishProcess(); } }