2024.8.23
Loading...
Searching...
No Matches
class.action.launchStartup.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 ActionLaunchStartup
12 *
13 * This class manages the application's launch startup settings.
14 * It initializes the settings based on the provided arguments and updates the configuration accordingly.
15 */
17{
18 /**
19 * ActionLaunchStartup constructor.
20 *
21 * This constructor uses the provided arguments to determine whether to enable or disable the application's
22 * launch at startup feature. It starts the loading process, updates the launch startup configuration based on
23 * the provided argument, and modifies the system's startup settings accordingly.
24 *
25 * @param array $args An array of arguments where the first element should be either Config::ENABLED or Config::DISABLED
26 * to indicate the desired launch startup setting.
27 */
28 public function __construct($args)
29 {
30 global $bearsamppConfig;
31
32 if (isset($args[0])) {
34 $launchStartup = $args[0] == Config::ENABLED;
35 if ($launchStartup) {
37 } else {
39 }
41 }
42 }
43}
const ENABLED
const CFG_LAUNCH_STARTUP
static startLoading()
static enableLaunchStartup()
static disableLaunchStartup()
global $bearsamppConfig
Definition homepage.php:26