Bearsampp 2026.3.26
API documentation
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 reload()
46 {
47 Util::logInfo('Reload apps');
48 foreach ($this->getAll() as $app) {
49 $app->reload();
50 }
51 }
52
58 public function update()
59 {
60 Util::logInfo('Update apps config');
61 foreach ($this->getAll() as $tool) {
62 $tool->update();
63 }
64 }
65
71 public function getAll()
72 {
73 return array(
74 $this->getPhpmyadmin(),
75 $this->getPhppgadmin()
76 );
77 }
78
86 public function getPhpmyadmin()
87 {
88 if ($this->phpmyadmin == null) {
89 $this->phpmyadmin = new AppPhpmyadmin('phpmyadmin', self::TYPE);
90 }
91 return $this->phpmyadmin;
92 }
93
101 public function getPhppgadmin()
102 {
103 if ($this->phppgadmin == null) {
104 $this->phppgadmin = new AppPhppgadmin('phppgadmin', self::TYPE);
105 }
106 return $this->phppgadmin;
107 }
108}
$phppgadmin
__construct()
reload()
update()
const TYPE
$phpmyadmin
getPhppgadmin()
getPhpmyadmin()
getAll()
static logInfo($data, $file=null)