2024.8.23
Loading...
Searching...
No Matches
class.action.refreshReposStartup.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 ActionRefreshReposStartup
12 *
13 * This class is responsible for handling the action of setting the scan startup for repositories.
14 */
16{
17 /**
18 * ActionRefreshReposStartup constructor.
19 *
20 * This constructor initializes the action to set the scan startup for repositories based on the provided arguments.
21 *
22 * @param array $args An array of arguments where the first argument should be 'git' to trigger the git repository scan startup setting,
23 * and the second argument is the value to set for the scan startup.
24 */
25 public function __construct($args)
26 {
27 // Global variable for accessing bearsamppTools
28 global $bearsamppTools;
29
30 // Check if the first and second arguments are set and not empty
31 if (isset($args[0]) && !empty($args[0]) && isset($args[1])) {
32 // If the first argument is 'git', set the scan startup value
33 if ($args[0] == ActionRefreshRepos::GIT) {
34 $bearsamppTools->getGit()->setScanStartup($args[1]);
35 }
36 }
37 }
38}