2024.8.23
|
Public Member Functions | |
__construct ($id, $type) | |
changePort ($port, $checkUsed=false, $wbProgressBar=null) | |
checkPort ($port, $ssl=false, $showWindow=false) | |
getConf () | |
getExe () | |
getItfConf () | |
getItfExe () | |
getLog () | |
getLogsPath () | |
getPort () | |
getService () | |
getSslPort () | |
rebuildConf () | |
reload ($id=null, $type=null) | |
setConf ($elts) | |
setEnable ($enabled, $showWindow=false) | |
setPort ($port) | |
setSslPort ($sslPort) | |
setVersion ($version) | |
switchVersion ($version, $showWindow=false) | |
Public Member Functions inherited from Module | |
__toString () | |
getCurrentPath () | |
getId () | |
getName () | |
getRelease () | |
getRootPath () | |
getSymlinkPath () | |
getType () | |
getVersion () | |
getVersionList () | |
isEnable () | |
update ($sub=0, $showWindow=false) | |
Data Fields | |
const | CFG_IP_FILTER_ALLOWED = 39 |
const | CFG_IP_FILTER_DISALLOWED = 40 |
const | CFG_SERVER_PORT = 0 |
const | CFG_SERVICE_DISPLAY_NAME = 59 |
const | CFG_SERVICE_NAME = 58 |
const | CFG_WELCOME_MSG = 15 |
const | LOCAL_CFG_CONF = 'filezillaConf' |
const | LOCAL_CFG_EXE = 'filezillaExe' |
const | LOCAL_CFG_ITF_CONF = 'filezillaItfConf' |
const | LOCAL_CFG_ITF_EXE = 'filezillaItfExe' |
const | LOCAL_CFG_PORT = 'filezillaPort' |
const | LOCAL_CFG_SSL_PORT = 'filezillaSslPort' |
const | ROOT_CFG_ENABLE = 'filezillaEnable' |
const | ROOT_CFG_VERSION = 'filezillaVersion' |
const | SERVICE_NAME = 'bearsamppfilezilla' |
Data Fields inherited from Module | |
const | BUNDLE_RELEASE = 'bundleRelease' |
Protected Member Functions | |
replaceAll ($params) | |
updateConfig ($version=null, $sub=0, $showWindow=false) | |
Protected Member Functions inherited from Module | |
__construct () | |
replace ($key, $value) | |
Private Attributes | |
$conf | |
$exe | |
$itfConf | |
$itfExe | |
$localItfConf | |
$log | |
$logsPath | |
$port | |
$service | |
$sslPort | |
Additional Inherited Members | |
Protected Attributes inherited from Module | |
$bearsamppConf | |
$bearsamppConfRaw | |
$currentPath | |
$enable | |
$name | |
$release = 'N/A' | |
$rootPath | |
$symlinkPath | |
$version | |
Class BinFilezilla
This class represents the FileZilla module in the Bearsampp application. It handles the configuration, management, and operations related to the FileZilla service.
Definition at line 16 of file class.bin.filezilla.php.
BinFilezilla::__construct | ( | $id, | |
$type ) |
Constructs a BinFilezilla object and initializes the module.
string | $id | The ID of the module. |
string | $type | The type of the module. |
Definition at line 55 of file class.bin.filezilla.php.
References Module\$id, Module\$type, Util\logInitClass(), and reload().
BinFilezilla::changePort | ( | $port, | |
$checkUsed = false, | |||
$wbProgressBar = null ) |
Changes the port for the FileZilla service.
int | $port | The new port number. |
bool | $checkUsed | Whether to check if the port is already in use. |
mixed | $wbProgressBar | The progress bar object for displaying progress. |
Definition at line 162 of file class.bin.filezilla.php.
References $port, Module\getName(), Util\isPortInUse(), Util\isValidPort(), Util\logDebug(), Util\logError(), setPort(), and Module\update().
BinFilezilla::checkPort | ( | $port, | |
$ssl = false, | |||
$showWindow = false ) |
Checks if the specified port is in use.
int | $port | The port number to check. |
bool | $ssl | Whether to use SSL for the check. |
bool | $showWindow | Whether to show a window with the result. |
Definition at line 202 of file class.bin.filezilla.php.
References $bearsamppLang, $port, Lang\CHECK_PORT_TITLE, Util\getHeaders(), Module\getName(), getService(), Util\isValidPort(), Util\logDebug(), Util\logError(), Lang\PORT_NOT_USED, Lang\PORT_NOT_USED_BY, and Lang\PORT_USED_BY.
BinFilezilla::getConf | ( | ) |
Retrieves the configuration file path for the FileZilla module.
Definition at line 336 of file class.bin.filezilla.php.
References $conf.
Referenced by updateConfig().
BinFilezilla::getExe | ( | ) |
Retrieves the executable file path for the FileZilla module.
Definition at line 448 of file class.bin.filezilla.php.
References $exe.
BinFilezilla::getItfConf | ( | ) |
Retrieves the interface configuration file path for the FileZilla module.
Definition at line 468 of file class.bin.filezilla.php.
References $itfConf.
BinFilezilla::getItfExe | ( | ) |
Retrieves the interface executable file path for the FileZilla module.
Definition at line 458 of file class.bin.filezilla.php.
References $itfExe.
BinFilezilla::getLog | ( | ) |
Retrieves the log file path for the FileZilla module.
Definition at line 438 of file class.bin.filezilla.php.
References $log.
BinFilezilla::getLogsPath | ( | ) |
Retrieves the logs path for the FileZilla module.
Definition at line 428 of file class.bin.filezilla.php.
References $logsPath.
BinFilezilla::getPort | ( | ) |
Retrieves the port number for the FileZilla service.
Definition at line 478 of file class.bin.filezilla.php.
References $port.
BinFilezilla::getService | ( | ) |
Retrieves the Win32Service object for the FileZilla service.
Definition at line 252 of file class.bin.filezilla.php.
References $service.
Referenced by checkPort().
BinFilezilla::getSslPort | ( | ) |
Retrieves the SSL port number for the FileZilla service.
Definition at line 498 of file class.bin.filezilla.php.
References $sslPort.
BinFilezilla::rebuildConf | ( | ) |
Rebuilds the configuration file for the FileZilla module.
Definition at line 375 of file class.bin.filezilla.php.
References setConf().
Referenced by updateConfig().
BinFilezilla::reload | ( | $id = null, | |
$type = null ) |
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 from Module.
Definition at line 67 of file class.bin.filezilla.php.
References $bearsamppConfig, $bearsamppLang, $bearsamppRoot, Module\$id, $log, Module\$type, APP_TITLE, Lang\ERROR_CONF_NOT_FOUND, Lang\ERROR_EXE_NOT_FOUND, Lang\ERROR_FILE_NOT_FOUND, Lang\ERROR_INVALID_PARAMETER, Lang\FILEZILLA, Util\formatUnixPath(), Module\getName(), LOCAL_CFG_CONF, LOCAL_CFG_EXE, LOCAL_CFG_ITF_CONF, LOCAL_CFG_ITF_EXE, LOCAL_CFG_PORT, LOCAL_CFG_SSL_PORT, Util\logDebug(), Util\logError(), Util\logInfo(), Util\logReloadClass(), Win32Service\SERVER_ERROR_NORMAL, and Win32Service\SERVICE_DEMAND_START.
Referenced by __construct(), setEnable(), and setVersion().
|
protected |
Replaces multiple key-value pairs in the configuration file.
This method reads the current configuration file, replaces the specified key-value pairs, and updates the internal configuration state. It also updates the port and SSL port properties if they are included in the key-value pairs.
array | $params | An associative array of key-value pairs to replace in the configuration file. |
Reimplemented from Module.
Definition at line 522 of file class.bin.filezilla.php.
References LOCAL_CFG_PORT, and LOCAL_CFG_SSL_PORT.
BinFilezilla::setConf | ( | $elts | ) |
Sets the configuration values for the FileZilla module.
array | $elts | An associative array of configuration key-value pairs. |
Definition at line 346 of file class.bin.filezilla.php.
References $conf.
Referenced by rebuildConf().
BinFilezilla::setEnable | ( | $enabled, | |
$showWindow = false ) |
Enables or disables the FileZilla module.
bool | $enabled | Whether to enable or disable the module. |
bool | $showWindow | Whether to show a window with the result. |
Definition at line 395 of file class.bin.filezilla.php.
References $bearsamppConfig, $bearsamppLang, Config\DISABLED, Lang\ENABLE_BUNDLE_NOT_EXIST, Lang\ENABLE_TITLE, Config\ENABLED, Module\getName(), Module\getVersion(), Util\installService(), Util\logDebug(), Util\logInfo(), reload(), and Util\removeService().
BinFilezilla::setPort | ( | $port | ) |
Sets the port number for the FileZilla service.
int | $port | The new port number. |
Definition at line 488 of file class.bin.filezilla.php.
References $port, and Module\replace().
Referenced by changePort().
BinFilezilla::setSslPort | ( | $sslPort | ) |
Sets the SSL port number for the FileZilla service.
int | $sslPort | The new SSL port number. |
Definition at line 508 of file class.bin.filezilla.php.
References $sslPort, and Module\replace().
BinFilezilla::setVersion | ( | $version | ) |
Sets the version for the FileZilla module.
string | $version | The version to set. |
Reimplemented from Module.
Definition at line 364 of file class.bin.filezilla.php.
References $bearsamppConfig, Module\$version, and reload().
Referenced by updateConfig().
BinFilezilla::switchVersion | ( | $version, | |
$showWindow = false ) |
Switches the version of the FileZilla module.
string | $version | The version to switch to. |
bool | $showWindow | Whether to show a window with the result. |
Definition at line 265 of file class.bin.filezilla.php.
References Module\$version, Util\logDebug(), and updateConfig().
|
protected |
Updates the configuration for the specified 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 with the result. |
Reimplemented from Module.
Definition at line 281 of file class.bin.filezilla.php.
References Module\$bearsamppConf, Module\$bearsamppConfRaw, $bearsamppLang, $conf, Module\$version, Lang\BEARSAMPP_CONF_MALFORMED_ERROR, Lang\BEARSAMPP_CONF_NOT_FOUND_ERROR, getConf(), Module\getName(), Module\getVersion(), Util\logDebug(), Util\logError(), rebuildConf(), setVersion(), and Lang\SWITCH_VERSION_TITLE.
Referenced by switchVersion().
|
private |
Definition at line 43 of file class.bin.filezilla.php.
Referenced by getConf(), setConf(), and updateConfig().
|
private |
Definition at line 41 of file class.bin.filezilla.php.
Referenced by getExe().
|
private |
Definition at line 44 of file class.bin.filezilla.php.
Referenced by getItfConf().
|
private |
Definition at line 42 of file class.bin.filezilla.php.
Referenced by getItfExe().
|
private |
Definition at line 45 of file class.bin.filezilla.php.
|
private |
Definition at line 39 of file class.bin.filezilla.php.
|
private |
Definition at line 38 of file class.bin.filezilla.php.
Referenced by getLogsPath().
|
private |
Definition at line 46 of file class.bin.filezilla.php.
Referenced by changePort(), checkPort(), getPort(), and setPort().
|
private |
Definition at line 37 of file class.bin.filezilla.php.
Referenced by getService().
|
private |
Definition at line 47 of file class.bin.filezilla.php.
Referenced by getSslPort(), and setSslPort().
const BinFilezilla::CFG_IP_FILTER_ALLOWED = 39 |
Definition at line 32 of file class.bin.filezilla.php.
Referenced by ActionSwitchOnline\switchFilezilla().
const BinFilezilla::CFG_IP_FILTER_DISALLOWED = 40 |
Definition at line 33 of file class.bin.filezilla.php.
Referenced by ActionSwitchOnline\switchFilezilla().
const BinFilezilla::CFG_SERVER_PORT = 0 |
Definition at line 30 of file class.bin.filezilla.php.
const BinFilezilla::CFG_SERVICE_DISPLAY_NAME = 59 |
Definition at line 35 of file class.bin.filezilla.php.
const BinFilezilla::CFG_SERVICE_NAME = 58 |
Definition at line 34 of file class.bin.filezilla.php.
const BinFilezilla::CFG_WELCOME_MSG = 15 |
Definition at line 31 of file class.bin.filezilla.php.
const BinFilezilla::LOCAL_CFG_CONF = 'filezillaConf' |
Definition at line 25 of file class.bin.filezilla.php.
Referenced by reload().
const BinFilezilla::LOCAL_CFG_EXE = 'filezillaExe' |
Definition at line 23 of file class.bin.filezilla.php.
Referenced by reload().
const BinFilezilla::LOCAL_CFG_ITF_CONF = 'filezillaItfConf' |
Definition at line 26 of file class.bin.filezilla.php.
Referenced by reload().
const BinFilezilla::LOCAL_CFG_ITF_EXE = 'filezillaItfExe' |
Definition at line 24 of file class.bin.filezilla.php.
Referenced by reload().
const BinFilezilla::LOCAL_CFG_PORT = 'filezillaPort' |
Definition at line 27 of file class.bin.filezilla.php.
Referenced by reload(), and replaceAll().
const BinFilezilla::LOCAL_CFG_SSL_PORT = 'filezillaSslPort' |
Definition at line 28 of file class.bin.filezilla.php.
Referenced by reload(), and replaceAll().
const BinFilezilla::ROOT_CFG_ENABLE = 'filezillaEnable' |
Definition at line 20 of file class.bin.filezilla.php.
const BinFilezilla::ROOT_CFG_VERSION = 'filezillaVersion' |
Definition at line 21 of file class.bin.filezilla.php.
const BinFilezilla::SERVICE_NAME = 'bearsamppfilezilla' |
Definition at line 18 of file class.bin.filezilla.php.
Referenced by ActionService\__construct(), Win32Service\create(), Win32Service\delete(), TplAppFilezilla\getActionInstallFilezillaService(), TplAppFilezilla\getActionRemoveFilezillaService(), TplAppOnline\getActionStatus(), Bins\getServices(), Batch\installFilezillaService(), ActionStartup\installServices(), ActionQuit\processWindow(), and Win32Service\start().