Bearsampp
2025.8.29
Loading...
Searching...
No Matches
class.action.manualRestart.php
Go to the documentation of this file.
1
<?php
2
/*
3
*
4
* * Copyright (c) 2022-2025 Bearsampp
5
* * License: GNU General Public License version 3 or later; see LICENSE.txt
6
* * Website: https://bearsampp.com
7
* * Github: https://github.com/Bearsampp
8
*
9
*/
10
18
class
ActionManualRestart
19
{
32
public
function
__construct
($args)
33
{
34
global
$bearsamppCore
,
$bearsamppBins
;
35
36
Util::logTrace
(
"Starting ActionManualRestart constructor"
);
37
38
// Start the loading process
39
Util::logTrace
(
"Starting loading process"
);
40
Util::startLoading
();
41
42
// Delete all services managed by Bearsampp
43
Util::logTrace
(
"Deleting all services managed by Bearsampp"
);
44
foreach
(
$bearsamppBins
->getServices() as $sName => $service) {
45
Util::logTrace
(
"Deleting service: "
. $sName);
46
$service->delete();
47
}
48
49
// Kill all related processes
50
Util::logTrace
(
"Killing all related processes"
);
51
Win32Ps::killBins
(
true
);
52
53
// Set the application to restart
54
Util::logTrace
(
"Setting application to restart"
);
55
$bearsamppCore
->setExec(
ActionExec::RESTART
);
56
57
// Stop the loading process
58
Util::logTrace
(
"Stopping loading process"
);
59
Util::stopLoading
();
60
}
61
}
$bearsamppBins
global $bearsamppBins
Definition
ajax.apache.php:16
$bearsamppCore
global $bearsamppCore
Definition
ajax.latestversion.php:24
ActionExec\RESTART
const RESTART
Definition
class.action.exec.php:28
ActionManualRestart
Definition
class.action.manualRestart.php:19
ActionManualRestart\__construct
__construct($args)
Definition
class.action.manualRestart.php:32
Util\logTrace
static logTrace($data, $file=null)
Definition
class.util.php:743
Util\startLoading
static startLoading()
Definition
class.util.php:935
Util\stopLoading
static stopLoading()
Definition
class.util.php:944
Win32Ps\killBins
static killBins($refreshProcs=false)
Definition
class.win32ps.php:179
Bearsampp-development
sandbox
core
classes
actions
class.action.manualRestart.php
Generated by
1.14.0