2024.8.23
Loading...
Searching...
No Matches
ActionReload Class Reference

Public Member Functions

 __construct ($args)
 

Detailed Description

Class ActionReload

This class handles the reloading of various configurations and settings for the Bearsampp application. It performs operations such as refreshing the hostname, updating startup settings, checking and updating the browser configuration, processing configuration files, and rebuilding certain cached contents.

Definition at line 17 of file class.action.reload.php.

Constructor & Destructor Documentation

◆ __construct()

ActionReload::__construct ( $args)

Constructs an ActionReload object and performs various refresh operations.

Parameters
array$argsThe arguments passed to the constructor.

@global Root $bearsamppRoot The root object of the Bearsampp application. @global Core $bearsamppCore The core object of the Bearsampp application. @global Config $bearsamppConfig The configuration object of the Bearsampp application. @global Bins $bearsamppBins The bins object containing various binaries used by the Bearsampp application. @global Homepage $bearsamppHomepage The homepage object for managing homepage-related settings and content.

Definition at line 30 of file class.action.reload.php.

31 {
33
34 // If the executable file exists, return early.
35 if (file_exists($bearsamppCore->getExec())) {
36 return;
37 }
38
39 // Start loading process
41
42 // Refresh hostname in the configuration
43 $bearsamppConfig->replace(Config::CFG_HOSTNAME, gethostname());
44
45 // Refresh launch startup setting in the configuration
47
48 // Check and update the browser setting in the configuration
49 $currentBrowser = $bearsamppConfig->getBrowser();
50 if (empty($currentBrowser) || !file_exists($currentBrowser)) {
52 }
53
54 // Process and update the bearsampp.ini file
55 file_put_contents($bearsamppRoot->getIniFilePath(), Util::utf8ToCp1252(TplApp::process()));
56
57 // Process and update the ConsoleZ configuration
59
60 // Refresh PEAR version cache file
61 $bearsamppBins->getPhp()->getPearVersion();
62
63 // Rebuild alias homepage content
64 $bearsamppHomepage->refreshAliasContent();
65
66 // Rebuild _commons.js content
67 $bearsamppHomepage->refreshCommonsJsContent();
68 }
global $bearsamppBins
global $bearsamppRoot
global $bearsamppCore
const ENABLED
const CFG_LAUNCH_STARTUP
const CFG_HOSTNAME
const CFG_BROWSER
static process()
static startLoading()
static utf8ToCp1252($data)
static isLaunchStartup()
static getDefaultBrowser()
Definition class.vbs.php:80
global $bearsamppConfig
Definition homepage.php:26
global $bearsamppHomepage
Definition homepage.php:26

References $bearsamppBins, $bearsamppConfig, $bearsamppCore, $bearsamppHomepage, $bearsamppRoot, Config\CFG_BROWSER, Config\CFG_HOSTNAME, Config\CFG_LAUNCH_STARTUP, Config\DISABLED, Config\ENABLED, Vbs\getDefaultBrowser(), Util\isLaunchStartup(), TplApp\process(), TplConsoleZ\process(), Util\startLoading(), and Util\utf8ToCp1252().


The documentation for this class was generated from the following file: