Bearsampp 2025.8.29
Loading...
Searching...
No Matches
class.apps.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
16class Apps
17{
21 const TYPE = 'apps';
22
26 private $phpmyadmin;
27
31 private $phppgadmin;
32
36 public function __construct()
37 {
38 }
39
45 public function update()
46 {
47 Util::logInfo('Update apps config');
48 foreach ($this->getAll() as $tool) {
49 $tool->update();
50 }
51 }
52
58 public function getAll()
59 {
60 return array(
61 $this->getPhpmyadmin(),
62 $this->getPhppgadmin()
63 );
64 }
65
73 public function getPhpmyadmin()
74 {
75 if ($this->phpmyadmin == null) {
76 $this->phpmyadmin = new AppPhpmyadmin('phpmyadmin', self::TYPE);
77 }
78 return $this->phpmyadmin;
79 }
80
88 public function getPhppgadmin()
89 {
90 if ($this->phppgadmin == null) {
91 $this->phppgadmin = new AppPhppgadmin('phppgadmin', self::TYPE);
92 }
93 return $this->phppgadmin;
94 }
95}
$phppgadmin
__construct()
update()
const TYPE
$phpmyadmin
getPhppgadmin()
getPhpmyadmin()
getAll()
static logInfo($data, $file=null)