Bearsampp 2026.9.23
Loading...
Searching...
No Matches
class.tpl.app.reload.php
Go to the documentation of this file.
1<?php
2
9{
13 const ACTION = 'reload';
14
26 public static function process(): array
27 {
28 global $bearsamppLang;
29
31 self::ACTION,
32 null,
34 false,
35 get_called_class()
36 );
37 }
38
47 public static function getActionReload(): string
48 {
49 return implode("\n", [
51 'Action: resetservices',
52 'Action: readconfig'
53 ]);
54 }
55
66 public static function triggerReload($args = null): 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 }
82}
83
global $bearsamppLang
const RELOAD
const RELOAD
static trace($data, $file=null)
static error($data, $file=null)
static getActionMulti($action, $args=array(), $item=array(), $disabled=false, $class=false)
static getActionRun($action, $args=array(), $item=array(), $waitUntilTerminated=true)
static triggerReload($args=null)