Bearsampp 2025.8.29
Loading...
Searching...
No Matches
class.tpl.app.reload.php
Go to the documentation of this file.
1<?php
2
7{
11 const ACTION = 'reload';
12
24 public static function process(): array
25 {
26 global $bearsamppLang;
28 self::ACTION,
29 null,
31 false,
32 get_called_class()
33 );
34 }
35
44 public static function getActionReload(): string
45 {
46 return implode("\n", [
48 'Action: resetservices',
49 'Action: readconfig'
50 ]);
51 }
52
63 public static function triggerReload($args = null): 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 }
78}
global $bearsamppLang
const RELOAD
const RELOAD
static getActionMulti($action, $args=array(), $item=array(), $disabled=false, $class=false)
static getActionRun($action, $args=array(), $item=array(), $waitUntilTerminated=true)
static triggerReload($args=null)
static logError($data, $file=null)
static logTrace($data, $file=null)