Bearsampp 2026.9.23
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

Class TplAppReload

Manages reload action templates and execution for the Bearsampp menu system.

Definition at line 8 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 47 of file class.tpl.app.reload.php.

47 : string
48 {
49 return implode("\n", [
51 'Action: resetservices',
52 'Action: readconfig'
53 ]);
54 }
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().

Here is the call graph for this function:

◆ process()

process ( )
static

Generates multi-action menu item for reload functionality

Returns
array Array structure for TplApp\getActionMulti containing:
  • Action identifier
  • Action parameters
  • Menu item configuration (label + glyph)
  • Disabled state
  • Calling class name @global Lang $bearsamppLang Bearsampp language configuration instance

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

26 : array
27 {
28 global $bearsamppLang;
29
31 self::ACTION,
32 null,
34 false,
35 get_called_class()
36 );
37 }
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ triggerReload()

triggerReload ( $args = null)
static

Executes reload sequence and returns action string

Parameters
mixed | null$argsArguments to pass to the reload action
Returns
string Generated reload action sequence, or an empty string if the reload fails

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

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

66 : string
67 {
68 Log::trace('ENTERING triggerReload..');
69
70 try {
71 new ActionReload($args);
72 $actionContent = self::getActionReload();
73 Log::trace('Generated reload actions: ' . $actionContent);
74
75 return $actionContent;
76 } catch (Exception $e) {
77 Log::error('Reload failed: ' . $e->getMessage());
78
79 return '';
80 }
81 }
static trace($data, $file=null)
static error($data, $file=null)

References Log\error(), getActionReload(), and Log\trace().

Referenced by ActionRebuildini\__construct().

Here is the call graph for this function:
Here is the caller graph for this function:

Field Documentation

◆ ACTION

const ACTION = 'reload'

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


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