Bearsampp 2025.8.29
Loading...
Searching...
No Matches
Apps Class Reference

Public Member Functions

 __construct ()
 getAll ()
 getPhpmyadmin ()
 getPhppgadmin ()
 update ()

Data Fields

const TYPE = 'apps'

Private Attributes

 $phpmyadmin
 $phppgadmin

Detailed Description

Class Apps

This class manages various application modules within the Bearsampp application. It provides methods to retrieve and update configurations for different tools such as PhpMyAdmin and PhpPgAdmin.

Definition at line 16 of file class.apps.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( )

Constructor for the Apps class.

Definition at line 36 of file class.apps.php.

37 {
38 }

Member Function Documentation

◆ getAll()

getAll ( )

Retrieves all application modules.

Returns
array An array containing instances of all application modules.

Definition at line 58 of file class.apps.php.

59 {
60 return array(
61 $this->getPhpmyadmin(),
62 $this->getPhppgadmin()
63 );
64 }
getPhppgadmin()
getPhpmyadmin()

References getPhpmyadmin(), and getPhppgadmin().

Referenced by update().

◆ getPhpmyadmin()

getPhpmyadmin ( )

Retrieves the PhpMyAdmin module instance.

If the instance is not already created, it initializes a new AppPhpmyadmin object.

Returns
AppPhpmyadmin The instance of the PhpMyAdmin module.

Definition at line 73 of file class.apps.php.

74 {
75 if ($this->phpmyadmin == null) {
76 $this->phpmyadmin = new AppPhpmyadmin('phpmyadmin', self::TYPE);
77 }
78 return $this->phpmyadmin;
79 }
$phpmyadmin

References $phpmyadmin.

Referenced by getAll().

◆ getPhppgadmin()

getPhppgadmin ( )

Retrieves the PhpPgAdmin module instance.

If the instance is not already created, it initializes a new AppPhppgadmin object.

Returns
AppPhppgadmin The instance of the PhpPgAdmin module.

Definition at line 88 of file class.apps.php.

89 {
90 if ($this->phppgadmin == null) {
91 $this->phppgadmin = new AppPhppgadmin('phppgadmin', self::TYPE);
92 }
93 return $this->phppgadmin;
94 }
$phppgadmin

References $phppgadmin.

Referenced by getAll().

◆ update()

update ( )

Updates the configuration for all application modules.

This method logs the update process and iterates through all the tools to update their configurations.

Definition at line 45 of file class.apps.php.

46 {
47 Util::logInfo('Update apps config');
48 foreach ($this->getAll() as $tool) {
49 $tool->update();
50 }
51 }
getAll()
static logInfo($data, $file=null)

References getAll(), and Util\logInfo().

Field Documentation

◆ $phpmyadmin

$phpmyadmin
private

Definition at line 26 of file class.apps.php.

Referenced by getPhpmyadmin().

◆ $phppgadmin

$phppgadmin
private

Definition at line 31 of file class.apps.php.

Referenced by getPhppgadmin().

◆ TYPE

const TYPE = 'apps'

The type of the module.

Definition at line 21 of file class.apps.php.

Referenced by Module\reload().


The documentation for this class was generated from the following file: