Change the protected to public for reload_settings

When waiting on a socket the call back needs to be accessible from anywhere
This commit is contained in:
markjcrane
2026-05-05 15:43:02 -06:00
parent cc32e04538
commit 34a3ef1400
7 changed files with 9 additions and 9 deletions
@@ -225,7 +225,7 @@ class active_conferences_service extends base_websocket_system_service implement
*
* @return void
*/
protected function reload_settings(): void {
public function reload_settings(): void {
// Re-read the config file to get any possible changes
parent::$config->read();
@@ -47,7 +47,7 @@ class event_guard_service extends service {
*
* @return void
*/
protected function reload_settings(): void {
public function reload_settings(): void {
// Re-read the config file to get any possible changes
parent::$config->read();
@@ -295,7 +295,7 @@ class operator_panel_service extends base_websocket_system_service implements we
*
* @return void
*/
protected function reload_settings(): void {
public function reload_settings(): void {
// Ensure reload is idempotent by removing stale listener/timers before re-registering.
if (!empty($this->switch_socket)) {
$this->remove_listener($this->switch_socket);
@@ -43,7 +43,7 @@ class system_dashboard_service extends base_websocket_system_service {
*
* @return void
*/
protected function reload_settings(): void {
public function reload_settings(): void {
static::set_system_information();
// re-read the config file to get any possible changes
@@ -47,7 +47,7 @@ class xml_cdr_service extends service {
*
* @return void
*/
protected function reload_settings(): void {
public function reload_settings(): void {
// Read the config file to get any possible changes
parent::$config->read();
@@ -115,7 +115,7 @@ class websocket_service extends service {
* @throws \RuntimeException
* @access protected
*/
protected function reload_settings(): void {
public function reload_settings(): void {
// Initialize tracking arrays
$this->listeners = [];
$this->clients = [];
+3 -3
View File
@@ -1003,7 +1003,7 @@ abstract class service {
/**
* Child classes must provide a mechanism to reload settings
*/
abstract protected function reload_settings(): void;
abstract public function reload_settings(): void;
/**
* Logs a message at the DEBUG level.
@@ -1137,7 +1137,7 @@ abstract class service {
//
class simple_example extends service {
protected function reload_settings(): void {
public function reload_settings(): void {
}
@@ -1190,7 +1190,7 @@ class child_service extends service {
//
// This function is required from the base service class because it is used when the reload command line option is used
//
protected function reload_settings(): void {
public function reload_settings(): void {
//informing the user in this example is simple but can use the parent class log functions
echo "Reloading settings\n";