Ending the install process.

@param string $message End message
6439
public function end($message)
    {
        $this->info($message);

        if ($this->progressBar instanceof ProgressBar) {
            $this->progressBar->setMessage($message);
            $this->progressBar->finish();
        }
    }
463856
protected function end(): void
    {
        if (($this->options & self::OUTPUT_LINES) === 0) {
            fwrite($this->stream, (isset($this->delimiter) ? "\n" : '') . ']');
        }
    }
243396
protected final function AttachError($message)
    {
        $this->result->message = $message;
        $this->result->success = false;
    }
1028554
static public function halt($message = null, \Exception $exception = null, $config = null)
    {

        echo self::cThrow($message, $exception, $config);
        exit (0);
    }
1016934
public function terminate($sig = null)
    {
        // Terminates application without reading anything more.
        foreach ($this->pipes as $key => $res) {
            $this->close($key);
        }
        $this->debug('process terminated');
        proc_terminate($this->process, $sig);
    }
957318
private function overwrite($message) {
        if ($this->overwrite) {
            if (!$this->firstRun) {
                // Move the cursor to the beginning of the line
                $this->output->write("\x0D");

                // Erase the line
                $this->output->write("\x1B[2K");

                // Erase previous lines
                if ($this->formatLineCount > 0) {
                    $this->output->write(str_repeat("\x1B[1A\x1B[2K", $this->formatLineCount));
                }
            }
        }
        elseif ($this->step > 0) {
            $this->output->writeln('');
        }

        $this->firstRun = false;

        $this->output->write($message);
    }
884812
public static function postInstall(Event $event): void
    {
        require_once $event->getComposer()->getConfig()->get('vendor-dir').'/autoload.php';

        self::clearCompiled();
    }
974604
public function logMessage(Message $message): void
    {
        if (in_array($message->getLevel(), $this->config['log'])) {
            // If script is running for very long time (e.g. CRON), then date might change if time passes midnight.
            // In that case, log will continue to write messages to new file.

            $fpFile = $this->getFileName();
            if ($fpFile !== $this->fpFile) {
                //date has changed? or we need to init?
                if ($this->fp) {
                    // close pointer to old file
                    @fclose($this->fp);
                }

                if ($this->config['path'] === null) {
                    $path = Application::getStoragePath('log' . DS . $fpFile);
                } else {
                    $path = str_replace(DS . DS, DS, $this->config['path'] . DS . $fpFile);
                }

                $this->fpFile = $fpFile;

                if (!($this->fp = @fopen($path, 'a'))) {
                    // file failed to open, maybe directory doesn't exists?
                    $dir = dirname($path);
                    if (!is_dir($dir)) {
                        Directory::mkdir($dir, $this->mode);
                    }

                    if (!($this->fp = @fopen($path, 'a'))) {
                        // now the directory should exists, so try to open file again
                        throw new Exception('Can not write to log file on path=' . $path);
                    }
                }
            }

            if (!$this->fp || $this->fp === null) {
                if ($this->config['path'] === null) {
                    $path = Application::getStoragePath('log' . DS . $fpFile);
                } else {
                    $path = str_replace(DS . DS, DS, $this->config['path'] . DS . $fpFile);
                }

                throw new Exception("Can not write to log file path={$path}");
            }

            if ($this->getMessageFunction !== null) {
                $line = call_user_func($this->getMessageFunction, $message);
            } else {
                $time = $message->getTime()->format('y-m-d H:i:s.v');
                $level = strtoupper($message->getLevel());
                $space = str_repeat(' ', 10 - strlen($level));
                $who = $message->getWho() ?? Log::getWho();
                $line = "{$time} {$level}{$space}{$who}\t{$message->getMessage()}\n";
            }

            if (!@fwrite($this->fp, $line)) { // actually write it in file
                throw new Exception('Unable to write to log file');
            }
        }
    }
236184
public function finish()
    {
        if ($this->request->data()) {
            if (rename(ROOT . '/config/settings.php.tmp', ROOT . '/config/settings.php')) {
                snapshot();
                $this->request->session()->delete('Startup');

                if (!empty($this->request->data['home'])) {
                    $this->redirect('/');
                } else {
                    $this->redirect('/admin');
                }
            } else {
                $this->Flash->danger(__d('installer', 'Unable to continue, check write permission for the "/config" directory.'));
            }
        }

        $this->title(__d('installer', 'Finish Installation'));
    }
1283242
public function message($message)
    {
        if(trim($message))
        {
            $msg = new stdClass();
            $msg->type = 'text';
            $msg->message = $message;
            $this->messages[] = $msg;
        }        
    }
720232
public function end()
	{
		if ($this->config['layout'] !== false && is_file($file = $this->getLayoutPath()) ) {
			extract($this->data, EXTR_OVERWRITE|EXTR_REFS);
            require($this->cache($file, true));
		}
	}
237075
public function endingTask()
    {
        $this->alert("Successfully Create ".$this->vendor.'/'.$this->package." Package");
        $this->comment(str_repeat('*', 65));
        $this->comment('  Package: '.$this->package);
        $this->output->writeln('');
        $this->line('  Namespace: '.htmlentities($this->namespace));
        $this->output->writeln('');
        $this->comment('  Path Location: '.$this->path);
        $this->comment(str_repeat('*', 65));
        $this->output->writeln('');
        $this->alert("Run: composer dump-autoload");
    }
1047862
public static function system($message)
    {
        self::output(
            trim(self::$brand . ' ' . $message),
            "\033[34m%s\033[0m"
        );

        self::output(PHP_EOL);
    }
688449
public function warning(string $message)
    {
        if ($this->status == 'ok') {
            $this->status = 'warning';
        }

        $this->warnings[] = $message;
    }
423128
public function endAction($message = 'done', $color = self::CLIGHT_GREEN) {
        $r = '';
        if (empty($this->currentAction)) {
            return $this->output($r);
        }
        $r .= $this->currentAction['message'];
        $time = $this->timeItTook($this->currentAction['time']);
        $length = ($this->currentActionHadLogs ? 0 : $this->currentAction['length']) + $this->lastTimeLenght + $this->getTextLength(' [' . $message . '] ');
        $spaceLength = $this->getScreen('columns') - $length - 2;
        $r .= ' ';
        if ($spaceLength > 0) {
            $r .= $this->color(str_repeat('.', $spaceLength), self::CDARK_GRAY);
        }
        $r .= $this->color(' [' . $message . '] ', $color) . $this->color($time) . "\n";
        $this->currentAction = null;
        if ($this->pendingActionLogs) {
            $r .= implode("\n", $this->pendingActionLogs) . "\n";
        }
        return $this->output($r);
    }
891001
protected function end_log() {
        if (!$this->progress) {
            return;
        }
        echo get_string('done', 'tool_generator', round(microtime(true) - $this->starttime, 1));
        if (CLI_SCRIPT) {
            echo "\n";
        } else {
            echo html_writer::end_tag('li');
        }
    }
947589
public function finish()
    {

        foreach ($this->drivers as $name => $class) {
            $handler = $class->getHandler();
            if (isset($handler->terminatable) && $handler->terminatable == false) {
                unset($this->drivers[$name]);
                continue;
            }

            if ($class->get('terminate') !== true) {
                $class->finish();
            }
            unset($this->drivers[$name]);
        }
        $this->drivers = [];
    }