2024.8.23
|
Public Member Functions | |
__toString () | |
getCurrentPath () | |
getId () | |
getName () | |
getRelease () | |
getRootPath () | |
getSymlinkPath () | |
getType () | |
getVersion () | |
getVersionList () | |
isEnable () | |
setVersion ($version) | |
update ($sub=0, $showWindow=false) | |
Data Fields | |
const | BUNDLE_RELEASE = 'bundleRelease' |
Protected Member Functions | |
__construct () | |
reload ($id=null, $type=null) | |
replace ($key, $value) | |
replaceAll ($params) | |
updateConfig ($version=null, $sub=0, $showWindow=false) | |
Protected Attributes | |
$bearsamppConf | |
$bearsamppConfRaw | |
$currentPath | |
$enable | |
$name | |
$release = 'N/A' | |
$rootPath | |
$symlinkPath | |
$version | |
Private Member Functions | |
createSymlink () | |
Private Attributes | |
$id | |
$type | |
Abstract class representing a module in the Bearsampp application. This class provides common functionalities for managing modules such as apps, bins, and tools.
Definition at line 14 of file class.module.php.
|
protected |
Constructor for the Module class. Initializes the module with default values.
Definition at line 36 of file class.module.php.
Module::__toString | ( | ) |
Returns the name of the module.
Definition at line 162 of file class.module.php.
References getName().
|
private |
Creates a symbolic link from the current path to the symlink path. If the symlink already exists and points to the correct target, no action is taken.
Definition at line 81 of file class.module.php.
References Batch\createSymlink(), Util\formatWindowsPath(), Util\logError(), and Batch\removeSymlink().
Referenced by reload().
Module::getCurrentPath | ( | ) |
Gets the current path of the module.
Definition at line 241 of file class.module.php.
References $currentPath.
Referenced by BinPhp\getApacheModule(), BinPhp\getExtensionsFromFolder(), BinPhp\getPearVersion(), BinPhp\getTsDll(), BinMysql\initData(), BinPostgresql\initData(), BinMysql\updateConfig(), and BinPostgresql\updateConfig().
Module::getId | ( | ) |
Gets the ID of the module.
Definition at line 180 of file class.module.php.
References $id.
Module::getName | ( | ) |
Gets the name of the module.
Definition at line 189 of file class.module.php.
References $name.
Referenced by __toString(), BinApache\changePort(), BinFilezilla\changePort(), BinMailhog\changePort(), BinMailpit\changePort(), BinMariadb\changePort(), BinMemcached\changePort(), BinMysql\changePort(), BinPostgresql\changePort(), BinXlight\changePort(), BinApache\checkPort(), BinFilezilla\checkPort(), BinMailhog\checkPort(), BinMailpit\checkPort(), BinMariadb\checkPort(), BinMemcached\checkPort(), BinMysql\checkPort(), BinPostgresql\checkPort(), BinXlight\checkPort(), BinApache\reload(), BinFilezilla\reload(), BinMailhog\reload(), BinMailpit\reload(), BinMariadb\reload(), BinMemcached\reload(), BinMysql\reload(), BinPostgresql\reload(), BinXlight\reload(), BinApache\setEnable(), BinFilezilla\setEnable(), BinMailhog\setEnable(), BinMailpit\setEnable(), BinMariadb\setEnable(), BinMemcached\setEnable(), BinMysql\setEnable(), BinNodejs\setEnable(), BinPhp\setEnable(), BinPostgresql\setEnable(), BinXlight\setEnable(), AppAdminer\updateConfig(), AppPhpmyadmin\updateConfig(), AppPhppgadmin\updateConfig(), AppWebgrind\updateConfig(), BinApache\updateConfig(), BinFilezilla\updateConfig(), BinMailhog\updateConfig(), BinMailpit\updateConfig(), BinMariadb\updateConfig(), BinMemcached\updateConfig(), BinMysql\updateConfig(), BinNodejs\updateConfig(), BinPhp\updateConfig(), BinPostgresql\updateConfig(), and BinXlight\updateConfig().
Module::getRelease | ( | ) |
Gets the release information of the module.
Definition at line 223 of file class.module.php.
References $release.
Module::getRootPath | ( | ) |
Gets the root path of the module.
Definition at line 232 of file class.module.php.
References $rootPath.
Module::getSymlinkPath | ( | ) |
Gets the symlink path of the module.
Definition at line 250 of file class.module.php.
References $symlinkPath.
Referenced by AppAdminer\updateConfig(), AppPhpmyadmin\updateConfig(), AppPhppgadmin\updateConfig(), AppWebgrind\updateConfig(), and ToolGit\updateConfig().
Module::getType | ( | ) |
Gets the type of the module.
Definition at line 171 of file class.module.php.
References $type.
Module::getVersion | ( | ) |
Gets the version of the module.
Definition at line 198 of file class.module.php.
References $version.
Referenced by BinPostgresql\checkPort(), BinPhp\getApacheModule(), BinApache\getOfflineContent(), BinApache\getOnlineContent(), BinPhp\getTsDll(), BinMysql\initData(), BinApache\setEnable(), BinFilezilla\setEnable(), BinMailhog\setEnable(), BinMailpit\setEnable(), BinMariadb\setEnable(), BinMemcached\setEnable(), BinMysql\setEnable(), BinNodejs\setEnable(), BinPhp\setEnable(), BinPostgresql\setEnable(), BinXlight\setEnable(), BinApache\updateConfig(), BinFilezilla\updateConfig(), BinMailhog\updateConfig(), BinMailpit\updateConfig(), BinMariadb\updateConfig(), BinMemcached\updateConfig(), BinMysql\updateConfig(), BinNodejs\updateConfig(), BinPhp\updateConfig(), BinPostgresql\updateConfig(), and BinXlight\updateConfig().
Module::getVersionList | ( | ) |
Gets the list of available versions for the module.
Definition at line 207 of file class.module.php.
References Util\getVersionList().
Referenced by BinPhp\getApacheModule().
Module::isEnable | ( | ) |
Checks if the module is enabled.
Definition at line 259 of file class.module.php.
References $enable.
|
protected |
Reloads the module configuration based on the provided ID and type.
string | null | $id | The ID of the module. If null, the current ID is used. |
string | null | $type | The type of the module. If null, the current type is used. |
Reimplemented in AppAdminer, AppPhpmyadmin, AppPhppgadmin, AppWebgrind, BinApache, BinFilezilla, BinMailhog, BinMailpit, BinMariadb, BinMemcached, BinMysql, BinNodejs, BinPhp, BinPostgresql, BinXlight, ToolComposer, ToolConsoleZ, ToolGhostscript, ToolGit, ToolNgrok, ToolPerl, ToolPython, ToolRuby, ToolXdc, and ToolYarn.
Definition at line 46 of file class.module.php.
References $bearsamppRoot, $id, $type, $version, createSymlink(), Apps\TYPE, Bins\TYPE, and Tools\TYPE.
|
protected |
Replaces a specific key-value pair in the configuration file.
string | $key | The key to replace. |
string | $value | The new value for the key. |
Definition at line 115 of file class.module.php.
References replaceAll().
Referenced by BinMailhog\setApiPort(), BinMailpit\setListen(), BinMemcached\setMemory(), BinApache\setPort(), BinFilezilla\setPort(), BinMariadb\setPort(), BinMemcached\setPort(), BinMysql\setPort(), BinPostgresql\setPort(), BinXlight\setPort(), BinMariadb\setRootPwd(), BinMysql\setRootPwd(), BinPostgresql\setRootPwd(), BinMariadb\setRootUser(), BinMysql\setRootUser(), BinPostgresql\setRootUser(), BinMailhog\setSmtpPort(), BinMailpit\setSmtpPort(), BinApache\setSslPort(), BinFilezilla\setSslPort(), BinXlight\setSslPort(), BinMailhog\setUiPort(), BinMailpit\setUiPort(), and BinMailpit\setWebRoot().
|
protected |
Replaces multiple key-value pairs in the configuration file.
array | $params | An associative array of key-value pairs to replace. |
Reimplemented in BinApache, BinFilezilla, BinMailhog, BinMailpit, BinMariadb, BinMemcached, BinMysql, BinPostgresql, and BinXlight.
Definition at line 124 of file class.module.php.
Referenced by replace().
|
abstract |
Sets the version of the module.
string | $version | The version to set. |
Reimplemented in AppAdminer, AppPhpmyadmin, AppPhppgadmin, AppWebgrind, BinApache, BinFilezilla, BinMailhog, BinMailpit, BinMariadb, BinMemcached, BinMysql, BinNodejs, BinPhp, BinPostgresql, BinXlight, ToolComposer, ToolConsoleZ, ToolGhostscript, ToolGit, ToolNgrok, ToolPerl, ToolPython, ToolRuby, ToolXdc, and ToolYarn.
Module::update | ( | $sub = 0, | |
$showWindow = false ) |
Updates the module configuration.
int | $sub | The sub-level for logging indentation. |
bool | $showWindow | Whether to show a window during the update process. |
Definition at line 141 of file class.module.php.
References updateConfig().
Referenced by BinApache\changePort(), BinFilezilla\changePort(), BinMailhog\changePort(), BinMailpit\changePort(), BinMariadb\changePort(), BinMemcached\changePort(), BinMysql\changePort(), BinPostgresql\changePort(), BinXlight\changePort(), BinMariadb\changeRootPassword(), BinMysql\changeRootPassword(), and BinPostgresql\changeRootPassword().
|
protected |
Updates the module configuration with a specific version.
string | null | $version | The version to update to. If null, the current version is used. |
int | $sub | The sub-level for logging indentation. |
bool | $showWindow | Whether to show a window during the update process. |
Reimplemented in AppAdminer, AppPhpmyadmin, AppPhppgadmin, AppWebgrind, BinApache, BinFilezilla, BinMailhog, BinMailpit, BinMariadb, BinMemcached, BinMysql, BinNodejs, BinPhp, BinPostgresql, BinXlight, and ToolGit.
Definition at line 152 of file class.module.php.
References $version, and Util\logDebug().
Referenced by update().
|
protected |
Definition at line 29 of file class.module.php.
Referenced by BinPhp\getApacheModule(), BinApache\updateConfig(), BinFilezilla\updateConfig(), BinMailhog\updateConfig(), BinMailpit\updateConfig(), BinMariadb\updateConfig(), BinMemcached\updateConfig(), BinMysql\updateConfig(), BinNodejs\updateConfig(), BinPhp\updateConfig(), BinPostgresql\updateConfig(), and BinXlight\updateConfig().
|
protected |
Definition at line 30 of file class.module.php.
Referenced by BinApache\updateConfig(), BinFilezilla\updateConfig(), BinMailhog\updateConfig(), BinMailpit\updateConfig(), BinMariadb\updateConfig(), BinMemcached\updateConfig(), BinMysql\updateConfig(), BinNodejs\updateConfig(), BinPhp\updateConfig(), BinPostgresql\updateConfig(), and BinXlight\updateConfig().
|
protected |
Definition at line 26 of file class.module.php.
Referenced by BinPhp\getApacheModule(), getCurrentPath(), BinPhp\getTsDll(), BinMysql\updateConfig(), and BinPostgresql\updateConfig().
|
protected |
Definition at line 28 of file class.module.php.
Referenced by isEnable().
|
private |
Definition at line 19 of file class.module.php.
Referenced by AppAdminer\__construct(), AppPhpmyadmin\__construct(), AppPhppgadmin\__construct(), AppWebgrind\__construct(), BinApache\__construct(), BinFilezilla\__construct(), BinMailhog\__construct(), BinMailpit\__construct(), BinMariadb\__construct(), BinMemcached\__construct(), BinMysql\__construct(), BinNodejs\__construct(), BinPhp\__construct(), BinPostgresql\__construct(), BinXlight\__construct(), ToolComposer\__construct(), ToolConsoleZ\__construct(), ToolGhostscript\__construct(), ToolGit\__construct(), ToolNgrok\__construct(), ToolPerl\__construct(), ToolPython\__construct(), ToolRuby\__construct(), ToolXdc\__construct(), ToolYarn\__construct(), getId(), AppAdminer\reload(), AppPhpmyadmin\reload(), AppPhppgadmin\reload(), AppWebgrind\reload(), BinApache\reload(), BinFilezilla\reload(), BinMailhog\reload(), BinMailpit\reload(), BinMariadb\reload(), BinMemcached\reload(), BinMysql\reload(), BinNodejs\reload(), BinPhp\reload(), BinPostgresql\reload(), BinXlight\reload(), reload(), ToolComposer\reload(), ToolConsoleZ\reload(), ToolGhostscript\reload(), ToolGit\reload(), ToolNgrok\reload(), ToolPerl\reload(), ToolPython\reload(), ToolRuby\reload(), ToolXdc\reload(), and ToolYarn\reload().
|
protected |
Definition at line 21 of file class.module.php.
Referenced by BinApache\getAliasContent(), BinPhp\getExtensionsFromConf(), BinPhp\getExtensionsFromFolder(), BinPhp\getExtensionsLoaded(), BinApache\getModulesFromConf(), BinApache\getModulesFromFolder(), BinApache\getModulesLoaded(), getName(), BinPhp\isSettingActive(), and BinPhp\isSettingExists().
|
protected |
Definition at line 23 of file class.module.php.
Referenced by getRelease().
|
protected |
Definition at line 25 of file class.module.php.
Referenced by getRootPath().
|
protected |
Definition at line 27 of file class.module.php.
Referenced by getSymlinkPath().
|
private |
Definition at line 18 of file class.module.php.
Referenced by AppAdminer\__construct(), AppPhpmyadmin\__construct(), AppPhppgadmin\__construct(), AppWebgrind\__construct(), BinApache\__construct(), BinFilezilla\__construct(), BinMailhog\__construct(), BinMailpit\__construct(), BinMariadb\__construct(), BinMemcached\__construct(), BinMysql\__construct(), BinNodejs\__construct(), BinPhp\__construct(), BinPostgresql\__construct(), BinXlight\__construct(), ToolComposer\__construct(), ToolConsoleZ\__construct(), ToolGhostscript\__construct(), ToolGit\__construct(), ToolNgrok\__construct(), ToolPerl\__construct(), ToolPython\__construct(), ToolRuby\__construct(), ToolXdc\__construct(), ToolYarn\__construct(), getType(), AppAdminer\reload(), AppPhpmyadmin\reload(), AppPhppgadmin\reload(), AppWebgrind\reload(), BinApache\reload(), BinFilezilla\reload(), BinMailhog\reload(), BinMailpit\reload(), BinMariadb\reload(), BinMemcached\reload(), BinMysql\reload(), BinNodejs\reload(), BinPhp\reload(), BinPostgresql\reload(), BinXlight\reload(), reload(), ToolComposer\reload(), ToolConsoleZ\reload(), ToolGhostscript\reload(), ToolGit\reload(), ToolNgrok\reload(), ToolPerl\reload(), ToolPython\reload(), ToolRuby\reload(), ToolXdc\reload(), and ToolYarn\reload().
|
protected |
Definition at line 22 of file class.module.php.
Referenced by BinMariadb\checkPort(), BinMysql\checkPort(), BinPostgresql\checkPort(), BinApache\getOfflineContent(), BinApache\getOnlineContent(), BinApache\getRequiredContent(), getVersion(), BinMysql\initData(), reload(), AppWebgrind\setVersion(), BinApache\setVersion(), BinFilezilla\setVersion(), BinMailhog\setVersion(), BinMailpit\setVersion(), BinMariadb\setVersion(), BinMemcached\setVersion(), BinMysql\setVersion(), BinNodejs\setVersion(), BinPhp\setVersion(), BinPostgresql\setVersion(), BinXlight\setVersion(), ToolComposer\setVersion(), ToolConsoleZ\setVersion(), ToolGhostscript\setVersion(), ToolGit\setVersion(), ToolNgrok\setVersion(), ToolPerl\setVersion(), ToolPython\setVersion(), ToolRuby\setVersion(), ToolXdc\setVersion(), ToolYarn\setVersion(), BinApache\switchVersion(), BinFilezilla\switchVersion(), BinMailhog\switchVersion(), BinMailpit\switchVersion(), BinMariadb\switchVersion(), BinMemcached\switchVersion(), BinMysql\switchVersion(), BinNodejs\switchVersion(), BinPhp\switchVersion(), BinPostgresql\switchVersion(), BinXlight\switchVersion(), AppAdminer\updateConfig(), AppPhpmyadmin\updateConfig(), AppPhppgadmin\updateConfig(), AppWebgrind\updateConfig(), BinApache\updateConfig(), BinFilezilla\updateConfig(), BinMailhog\updateConfig(), BinMailpit\updateConfig(), BinMariadb\updateConfig(), BinMemcached\updateConfig(), BinMysql\updateConfig(), BinNodejs\updateConfig(), BinPhp\updateConfig(), BinPostgresql\updateConfig(), BinXlight\updateConfig(), updateConfig(), and ToolGit\updateConfig().
const Module::BUNDLE_RELEASE = 'bundleRelease' |
Definition at line 16 of file class.module.php.