2024.8.23
Loading...
Searching...
No Matches
class.action.switchLogsVerbose.php
Go to the documentation of this file.
1
<?php
2
/*
3
* Copyright (c) 2021-2024 Bearsampp
4
* License: GNU General Public License version 3 or later; see LICENSE.txt
5
* Author: Bear
6
* Website: https://bearsampp.com
7
* Github: https://github.com/Bearsampp
8
*/
9
10
/**
11
* Class ActionSwitchLogsVerbose
12
*
13
* This class handles the action of switching the verbosity level of logs.
14
*/
15
class
ActionSwitchLogsVerbose
16
{
17
/**
18
* ActionSwitchLogsVerbose constructor.
19
*
20
* @param array $args An array of arguments where the first element should be the verbosity level (0-3).
21
*/
22
public
function
__construct
($args)
23
{
24
global
$bearsamppConfig
;
25
26
// Check if the first argument is set, is numeric, and within the valid range (0-3)
27
if
(isset($args[0]) && is_numeric($args[0]) && $args[0] >= 0 && $args[0] <= 3) {
28
// Replace the current verbosity level in the configuration
29
$bearsamppConfig
->replace(
Config::CFG_LOGS_VERBOSE
, $args[0]);
30
}
31
}
32
}
ActionSwitchLogsVerbose
Definition
class.action.switchLogsVerbose.php:16
ActionSwitchLogsVerbose\__construct
__construct($args)
Definition
class.action.switchLogsVerbose.php:22
Config\CFG_LOGS_VERBOSE
const CFG_LOGS_VERBOSE
Definition
class.config.php:19
$bearsamppConfig
global $bearsamppConfig
Definition
homepage.php:26
Bearsampp-development
sandbox
core
classes
actions
class.action.switchLogsVerbose.php
Generated by
1.11.0