Bearsampp 2025.8.29
Loading...
Searching...
No Matches
TplAppReload Class Reference

Static Public Member Functions

static getActionReload ()
static process ()
static triggerReload ($args=null)

Data Fields

const ACTION = 'reload'

Detailed Description

Manages reload action templates and execution for Bearsampp menu system

Definition at line 6 of file class.tpl.app.reload.php.

Member Function Documentation

◆ getActionReload()

getActionReload ( )
static

Builds sequence of actions for configuration reload

Returns
string Concatenated action sequence containing:
  1. PHP process execution command
  2. Service reset command
  3. Configuration reload command

Definition at line 44 of file class.tpl.app.reload.php.

44 : string
45 {
46 return implode("\n", [
48 'Action: resetservices',
49 'Action: readconfig'
50 ]);
51 }
const RELOAD
static getActionRun($action, $args=array(), $item=array(), $waitUntilTerminated=true)

References TplApp\getActionRun(), and Action\RELOAD.

Referenced by TplAppApache\getActionAddAlias(), TplAppApache\getActionAddVhost(), TplAppApache\getActionChangeApachePort(), TplAppBrowser\getActionChangeBrowser(), TplAppMailpit\getActionChangeMailpitPort(), TplAppMariadb\getActionChangeMariadbPort(), TplAppMariadb\getActionChangeMariadbRootPwd(), TplAppMemcached\getActionChangeMemcachedPort(), TplAppMysql\getActionChangeMysqlPort(), TplAppMysql\getActionChangeMysqlRootPwd(), TplAppPostgresql\getActionChangePostgresqlPort(), TplAppPostgresql\getActionChangePostgresqlRootPwd(), TplAppXlight\getActionChangeXlightPort(), TplAppApache\getActionEditAlias(), TplAppApache\getActionEditVhost(), TplAppApache\getActionEnableApache(), TplAppMailpit\getActionEnableMailpit(), TplAppMariadb\getActionEnableMariadb(), TplAppMemcached\getActionEnableMemcached(), TplAppMysql\getActionEnableMysql(), TplAppNodejs\getActionEnableNodejs(), TplAppPhp\getActionEnablePhp(), TplAppPostgresql\getActionEnablePostgresql(), TplAppXlight\getActionEnableXlight(), TplAppApache\getActionInstallApacheService(), TplAppMailpit\getActionInstallMailpitService(), TplAppMariadb\getActionInstallMariadbService(), TplAppMemcached\getActionInstallMemcachedService(), TplAppMysql\getActionInstallMysqlService(), TplAppPostgresql\getActionInstallPostgresqlService(), TplAppXlight\getActionInstallXlightService(), TplAppLaunchStartup\getActionLaunchStartup(), TplAppGit\getActionRefreshGitRepos(), TplAppGit\getActionRefreshGitReposStartup(), TplAppApache\getActionRemoveApacheService(), TplAppMailpit\getActionRemoveMailpitService(), TplAppMariadb\getActionRemoveMariadbService(), TplAppMemcached\getActionRemoveMemcachedService(), TplAppMysql\getActionRemoveMysqlService(), TplAppPostgresql\getActionRemovePostgresqlService(), TplAppXlight\getActionRemoveXlightService(), TplAppOnline\getActionStatus(), TplAppApache\getActionSwitchApacheModule(), TplAppApache\getActionSwitchApacheVersion(), TplAppLang\getActionSwitchLang(), TplAppLogsVerbose\getActionSwitchLogsVerbose(), TplAppMailpit\getActionSwitchMailpitVersion(), TplAppMariadb\getActionSwitchMariadbVersion(), TplAppMemcached\getActionSwitchMemcachedVersion(), TplAppMysql\getActionSwitchMysqlVersion(), TplAppNodejs\getActionSwitchNodejsVersion(), TplAppPhp\getActionSwitchPhpExtension(), TplAppPhp\getActionSwitchPhpSetting(), TplAppPhp\getActionSwitchPhpVersion(), TplAppPostgresql\getActionSwitchPostgresqlVersion(), TplAppXlight\getActionSwitchXlightVersion(), TplApp\getSectionStartupAction(), and triggerReload().

◆ process()

process ( )
static

Generates multi-action menu item for reload functionality

@global Lang $bearsamppLang Bearsampp language configuration instance

Returns
array Array structure for TplApp\getActionMulti containing:
  • Action identifier
  • Action parameters
  • Menu item configuration (label + glyph)
  • Disabled state
  • Calling class name

Definition at line 24 of file class.tpl.app.reload.php.

24 : array
25 {
26 global $bearsamppLang;
28 self::ACTION,
29 null,
31 false,
32 get_called_class()
33 );
34 }
global $bearsamppLang
const RELOAD
static getActionMulti($action, $args=array(), $item=array(), $disabled=false, $class=false)

References $bearsamppLang, TplApp\getActionMulti(), TplAestan\GLYPH_RELOAD, and Lang\RELOAD.

Referenced by TplApp\getSectionMenuRight().

◆ triggerReload()

triggerReload ( $args = null)
static

Executes reload sequence and returns action string

Parameters
mixed | null$argsArguments to pass to reload action
Returns
string Generated INI action sequence
Exceptions
ExceptionIf reload operation fails

@log TRACE: Logs method entry and generated action content @log ERROR: Captures and logs any exceptions during reload

Definition at line 63 of file class.tpl.app.reload.php.

63 : string
64 {
65 Util::logTrace('ENTERING triggerReload..');
66
67 try {
68 new ActionReload($args);
69 $actionContent = self::getActionReload();
70 Util::logTrace('Generated reload actions: ' . $actionContent);
71 return $actionContent;
72
73 } catch (Exception $e) {
74 Util::logError('Reload failed: ' . $e->getMessage());
75 return '';
76 }
77 }
static logError($data, $file=null)
static logTrace($data, $file=null)

References getActionReload(), Util\logError(), and Util\logTrace().

Referenced by ActionRebuildini\__construct().

Field Documentation

◆ ACTION

const ACTION = 'reload'

Definition at line 11 of file class.tpl.app.reload.php.


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