Start run the application

@return null
424624
function run()
    {
        // Set default error level, In dev env show all errors
        // ini_set('display_errors', Config::get('show_errors') ? 'Off' : 'Off');
        ini_set('display_errors', 'Off');
        error_reporting(E_ALL | E_STRICT);

        if (!defined('SERVER_MODE')) {
            // Mark server mode
            define('SERVER_MODE', 'fpm');
        }

        try {
            $route = (\ePHP\Core\Route::init())->findRoute();
            // dumpdie($route);

            if (empty($route)) {
                \show_404();
            }

            // 整理参数
            $_GET['controller'] = $route[0];
            $_GET['action']     = $route[1];

            $controller_name = $route[2];
            $action_name     = $_GET['action'];

            $_REQUEST  = array_merge($_COOKIE, $_GET, $_POST);

            // 检查ACTION是否存在
            if ( !method_exists($controller_name, $action_name) ) {
                if (defined('RUN_ENV') && RUN_ENV == 'prod') {
                    \show_404();
                } else {
                    \show_error("method {$action_name}() is not defined in {$controller_name}");
                }
            }

            if (SERVER_MODE === 'fpm') {
                call_user_func([new $controller_name(), $action_name]);
            } else if (SERVER_MODE === 'swoole') {
                try {
                    // $c_init = new $controller_name();
                    // // $c_init->request = $request;
                    // // $c_init->response = $response;

                    // $c_init->{$action_name}();
                    call_user_func([new $controller_name(), $action_name]);
                } catch (\Swoole\ExitException $e) {
                    // 屏蔽exit异常，不输出任何信息
                    return ;
                }
            }
        } catch (\ePHP\Exception\CommonException $e) {
            // ExitException don't show error message
            if ($e->getCode() === -99) {
                return ;
            }
            echo $e;
        }
    }
262633
protected function start()
    {
        $this->client->executeCommand(
            $this->client->createCommand('MONITOR')
        );
        $this->valid = true;
    }
69408
public static function start()
    {
        /*
            session_id() will continue to return id even after session_write_close()
        */
        if (\session_status() === PHP_SESSION_ACTIVE) {
            return true;
        }
        if (\headers_sent()) {
            return false;
        }
        self::setCfg(array());  // makes sure all default's determined and set
        $success = \session_start();
        \bdk\Debug::_info('started', \session_id());
        if (self::$cfgStatic['regenOnStart']) {
            self::regenerateId();
        }
        return $success;
    }
667620
public function start()
    {
        $whoops  = new Run();
        $handler = new PrettyPageHandler();

        $handler->addResourcePath(__DIR__.'/Resources');
        $handler->setEditor('sublime');

        $whoops->pushHandler($handler);
        $whoops->register();

        $this->whoops = $whoops;
    }
343706
public function start()
    {
        $command = $this->client->createCommand('MONITOR');
        $this->client->executeCommand($command, $this);
    }
807092
public function start()
    {
        $data = Utility::get($this->params, "data", array());
        if ($data && count($data)>0) {
            switch($this->dataFormat)
            {
            case "table":
                $columnNames = $data[0];
                $metaData = array("columns"=>array());
                for ($i=0;$i<count($columnNames);$i++) {
                    $metaData["columns"][$columnNames[$i]] = array(
                        "type"=>(isset($data[1]))
                            ?$this->guessType($data[1][$i]):"unknown",
                    );;
                }
                $this->sendMeta($metaData, $this);
                $this->startInput(null);
                $rowNum = count($data);
                for ($i=1;$i<$rowNum;$i++) {
                    $this->next(array_combine($columnNames, $data[$i]), $this);
                }
                break;
            case "associate":
            default:
                $metaData = array("columns"=>array());
                foreach ($data[0] as $key=>$value) {
                    $metaData["columns"][$key]=array(
                        "type"=>$this->guessType($value),
                    );
                }
                $this->sendMeta($metaData, $this);
                $this->startInput(null);
                foreach ($data as $row) {
                    $this->next($row);
                }
                break;
            }
        }
        $this->endInput(null);
    }
1042354
public function run()
    {
        if ($this->booted) {
            return;
        }
        
        // Boot kernel and console
        $this->kernel->withoutSession();
        $this->kernel->boot();
        
        $this->booted = true;

        foreach ($this->setting->getBootstrap() as $item) {
            require $item;
        }
        
        $command = $this->arg->getParameter('command');

        if (array_key_exists($command, $this->registers)) {
            return $this->registers[$command]($this->arg);
        }

        if ($command == 'launch') {
            $command = null;
        }

        if ($command == 'run') {
            $command = 'launch';
        }

        try {
            $this->call($command);
        } catch (ConsoleException $exception) {
            echo Color::red($exception->getMessage());
            exit(1);
        }
    }
427305
public function run()
    {
        // Load routing user config file
        $this->routes();
        // Launch routage
        Router::resolve();
        // Load databases user config file
        $this->databases();
        // Load Bootstrap
        $this->bootstrap();
        // Launch Controller defined by routage
        $bodyContent = $this->controller();
        // Show body content return by Controller
        echo $bodyContent;
    }
1060896
public function run()
    {
        $pagination = (new PageList())->getPagination();
        $app = Application::getFacadeApplication();
        $tracker = $app->make('statistics/tracker');

        do {
            if ($results = $pagination->getCurrentPageResults()) {
                /** @var \Concrete\Core\Page\Page $page */
                foreach ($results as $page) {
                    try {
                        $tracker->track($page);
                    } catch (\Exception $e) {
                        dd($e->getMessage(), $e->getTraceAsString());
                    }
                }
            }
        } while ($pagination->hasNextPage() && $pagination->setCurrentPage($pagination->getNextPage()));
    }
92679
protected function start()
    {
        $pid = $this->getMasterPid();

        if ($this->isRunning($pid)) {
            $this->output->writeln('<error>swoole http server process is already running.</error>');
            return;
        }

        $this->output->writeln('Starting swoole http server...');

        /** @var Swoole $swoole */
        $swoole = $this->app->make(Swoole::class);

        if ($this->config['auto_reload']) {
            //热更新
            /** @var \Swoole\Server $server */
            $server = $this->app->make(\think\swoole\facade\Server::class);

            $server->addProcess($this->getHotReloadProcess($server, (int) $this->config['auto_reload']));
        }

        $host = $this->config['server']['host'];
        $port = $this->config['server']['port'];

        $this->output->writeln("Swoole http server started: <http://{$host}:{$port}>");
        $this->output->writeln('You can exit with <info>`CTRL-C`</info>');

        $swoole->run();
    }
793082
public function start()
    {
        if (!$this->hasStarted()) {
            $this->setStarted();
            $this->dispatch(RunEvent::STARTED, new RunEvent($this));
            try {
                try {
                    $output = call_user_func($this->callback);
                    $this->handleOutput($output);
                    $this->setFinished();
                    $this->successful = true;
                    $this->dispatch(RunEvent::SUCCESSFUL, new RunEvent($this));
                } catch (Exception $e) {
                    $this->setFinished();
                    $this->successful = false;
                    $this->exception = $e;
                    $this->dispatch(RunEvent::FAILED, new RunEvent($this));
                } catch (Throwable $e) {
                    $this->setFinished();
                    $this->successful = false;
                    $this->exception = $e;
                    $this->dispatch(RunEvent::FAILED, new RunEvent($this));
                }
            } finally {
                $this->dispatch(RunEvent::COMPLETED, new RunEvent($this));
            }
        }

        return $this;
    }
639257
protected function start()
    {
        if ($this->isRunning($this->getCurrentPid())) {
            $this->error('Failed! swoole_http_server process is already running.');

            return;
        }

        $host = Arr::get($this->config, 'server.host');
        $port = Arr::get($this->config, 'server.port');
        $hotReloadEnabled = Arr::get($this->config, 'hot_reload.enabled');
        $accessLogEnabled = Arr::get($this->config, 'server.access_log');

        $this->info('Starting swoole http server...');
        $this->info("Swoole http server started: <http://{$host}:{$port}>");
        if ($this->isDaemon()) {
            $this->info(
                '> (You can run this command to ensure the ' .
                'swoole_http_server process is running: ps aux|grep "swoole")'
            );
        }

        $manager = $this->laravel->make(Manager::class);
        $server = $this->laravel->make(Server::class);

        if ($accessLogEnabled) {
            $this->registerAccessLog();
        }

        if ($hotReloadEnabled) {
            $manager->addProcess($this->getHotReloadProcess($server));
        }

        $manager->run();
    }
379805
public function start()
  {
    try
    {
        $host    = $this->getOption('host');
        $port    = intval($this->getOption('port'));
        $binary  = ProcessUtils::escapeArgument((new PhpExecutableFinder)->find(false));
        $docroot = ProcessUtils::escapeArgument($this->getOption('docroot'));
        $output  = $this->output;

        $this->writeln([
          sprintf('Codeigniter development server started at %s', date(DATE_RFC2822)),
          sprintf('Listening on http://%s:%s', $host, $port),
          sprintf('Document root is %s', getcwd()),
          'Press Ctrl-C to quit.'
        ]);

        $process = new Process(sprintf('%s -S %s:%s -t %s', $binary, $host, $port, $docroot));

        $process
            // ->setWorkingDirectory(getcwd())
            ->setTimeout(0)
            ->setPTY(true)
            ->run(function ($type, $buffer) use($output) {
                if (Process::ERR === $type && $output instanceof ConsoleOutputInterface) {
                    $output = $output->getErrorOutput();
                }
                $output->write($buffer, false, OutputInterface::OUTPUT_RAW);
            });
    }
    catch (Exception $e)
    {
        $this->error(sprintf(
            'Error starting the server: %s', $e->getMessage()
        ));
    }
  }
1246271
public function run()
    {
        if (empty($this->packagesMetadata)) {
            $this->setup();
            if (empty($this->packagesMetadata)) {
                // @codeCoverageIgnoreStart
                $e = new PackagesNotFoundException('Application has no packages.');
                $e->setAdditionalData('Application Path', $this->appDirectory);
                $this->error($e);
                return;
                // @codeCoverageIgnoreEnd
            }
        }

        $this->router = new Router();
        $this->router->setRoutes($this->routes);
        $this->router->setMethod($this->request->getRequestMethod());
        $this->router->setPath($this->request->getRequestUri());
        $this->router->setIp($this->request->getClientIp());
        try {
            $route = $this->router->getRoute();
        } catch (RouteNotFoundException $e) {
            $this->notFound($e);
            return;
        }

        $middleware = false;
        if ($this->hasMiddleware()) {
            $middleware = new MiddlewareProcessor($this->config['Middleware']);
        }
        $package = $this->getPackage($route['package']);
        $runnable = $route['runnable'];
        $runnables = explode('::', $runnable);

        // Check if it's a view script only.
        if ($route['view.directRender'] === true) {
            try {
                if ($middleware) {
                    $middleware->runBefore($this->request, $this->response);
                }
                $view = $this->getViewFor($package['package_name'], $runnables[0], $runnables[1]);
                if ($route['view.layout'] !== false) {
                    $view->setLayout($route['view.layout']);
                }
                $view->setResponse($this->response);
                $view->render();
                if ($middleware) {
                    $middleware->runAfter();
                }
                return;
                // @codeCoverageIgnoreStart
            } catch (\Exception $e) {
                $this->error($e);
                return;
            }
        }

        $classString = $package['namespace'] . '\\src\\' . $runnables[0];

        if (class_exists($classString)) {
            try {
                if ($middleware) {
                    $middleware->runBefore($this->request, $this->response);
                }
                $instance = $this->getRunnable($package['package_name'], $runnables[0], $runnables[1], $classString);
                if (is_callable(array($instance, $runnables[1]))) {
                    if ($route['view.layout'] !== false) {
                        $instance->getView()->setLayout($route['view.layout']);
                    }
                    call_user_func_array(array($instance, $runnables[1]), $route['params']);
                    $instance->finalise();
                    if ($middleware) {
                        $middleware->runAfter();
                    }
                    return;
                }
            // @codeCoverageIgnoreStart
            } catch (\Exception $e) {
                $this->error($e);
                return;
            }

            $this->notFound(new RunnableNotFoundException('No such runnable: ' . $classString . '::' . $runnables[1]));
        }

        $this->notFound(new RunnableNotFoundException('No such runnable: ' . $classString . '::' . $runnables[1]));
    }
710918
public function runAction()
    {
        try {
            $this->commandBus->dispatch(CreateDefaultProcessingConfigFile::in(ConfigLocation::fromPath(Definition::getSystemConfigDir())));

            $sqliteDbFile = SqliteDbFile::initializeFromDist(Definition::getEventStoreSqliteDbFile());

            $esConfigLocation = ConfigLocation::fromPath(Definition::getSystemConfigDir());

            $this->commandBus->dispatch(InitializeEventStore::setUpWithSqliteDbAdapter($sqliteDbFile, $esConfigLocation));

        } catch (\Exception $ex) {
            $this->commandBus->dispatch(UndoSystemSetUp::removeConfigs(
                Definition::getSystemConfigDir(),
                Definition::getSystemConfigDir(),
                Definition::getEventStoreSqliteDbFile()
            ));

            throw $ex;
        }

        return $this->redirect()->toRoute('prooph.link/system_config');
    }
1084847
public function run()
	{
		return $this->style->getCharacter()->setIsStrikethrough(
			$this->parameter === null || (bool) $this->parameter
		);
	}
1136977
public function run()
    {
        $topdir = $this->getBasePath();

        foreach (scandir($topdir) as $filename) {

            // Skip directory link files
            if (($filename == '.') || ($filename == '..')) {
                continue;
            }

            if (is_dir($topdir . DIRECTORY_SEPARATOR . $filename)) {
                // Recurse into lower level directory, providing the namespace
                $this->loadFiles($filename, $filename);
            }
        }
    }