2024.8.23
Loading...
Searching...
No Matches
class.action.manualRestart.php
Go to the documentation of this file.
1<?php
2/*
3 * Copyright (c) 2021-2024 Bearsampp
4 * License: GNU General Public License version 3 or later; see LICENSE.txt
5 * Author: Bear
6 * Website: https://bearsampp.com
7 * Github: https://github.com/Bearsampp
8 */
9
10/**
11 * Class ActionManualRestart
12 *
13 * This class handles the manual restart of services in the Bearsampp application.
14 * It stops all running services, kills all related processes, and sets the application
15 * to restart.
16 */
18{
19 /**
20 * ActionManualRestart constructor.
21 *
22 * @param array $args Arguments passed to the constructor.
23 *
24 * This constructor initializes the manual restart process by performing the following steps:
25 * 1. Starts the loading process.
26 * 2. Deletes all services managed by Bearsampp.
27 * 3. Kills all related processes.
28 * 4. Sets the application to restart.
29 * 5. Stops the loading process.
30 */
31 public function __construct($args)
32 {
34
35 // Start the loading process
37
38 // Delete all services managed by Bearsampp
39 foreach ($bearsamppBins->getServices() as $sName => $service) {
40 $service->delete();
41 }
42
43 // Kill all related processes
45
46 // Set the application to restart
48
49 // Stop the loading process
51 }
52}
global $bearsamppBins
global $bearsamppCore
static stopLoading()
static startLoading()
static killBins($refreshProcs=false)