2024.8.23
Loading...
Searching...
No Matches
BinMailpit Class Reference
+ Inheritance diagram for BinMailpit:
+ Collaboration diagram for BinMailpit:

Public Member Functions

 __construct ($id, $type)
 
 changePort ($port, $checkUsed=false, $wbProgressBar=null)
 
 checkPort ($port, $showWindow=false)
 
 getExe ()
 
 getListen ()
 
 getLog ()
 
 getService ()
 
 getSmtpPort ()
 
 getUiPort ()
 
 getWebRoot ()
 
 rebuildConf ()
 
 reload ($id=null, $type=null)
 
 setEnable ($enabled, $showWindow=false)
 
 setListen ()
 
 setSmtpPort ($smtpPort)
 
 setUiPort ($uiPort)
 
 setVersion ($version)
 
 setWebRoot ($webRoot)
 
 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 LOCAL_CFG_EXE = 'mailpitExe'
 
const LOCAL_CFG_LISTEN = 'mailpitListen'
 
const LOCAL_CFG_SMTP_PORT = 'mailpitSmtpPort'
 
const LOCAL_CFG_UI_PORT = 'mailpitUiPort'
 
const LOCAL_CFG_WEB_ROOT = 'mailpitWebRoot'
 
const ROOT_CFG_ENABLE = 'mailpitEnable'
 
const ROOT_CFG_VERSION = 'mailpitVersion'
 
const SERVICE_NAME = 'bearsamppmailpit'
 
const SERVICE_PARAMS = ' --listen "%s:%d" --smtp "%s:%d" --webroot "%s"'
 
- 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

 $exe
 
 $listen
 
 $log
 
 $service
 
 $smtpPort
 
 $uiPort
 
 $webRoot
 

Additional Inherited Members

- Protected Attributes inherited from Module
 $bearsamppConf
 
 $bearsamppConfRaw
 
 $currentPath
 
 $enable
 
 $name
 
 $release = 'N/A'
 
 $rootPath
 
 $symlinkPath
 
 $version
 

Detailed Description

Class BinMailpit

This class represents the Mailpit module in the Bearsampp application. It handles the configuration, initialization, and management of the Mailpit service.

Definition at line 16 of file class.bin.mailpit.php.

Constructor & Destructor Documentation

◆ __construct()

BinMailpit::__construct ( $id,
$type )

Constructs a BinMailpit object and initializes the module.

Parameters
string$idThe ID of the module.
string$typeThe type of the module.

Definition at line 45 of file class.bin.mailpit.php.

46 {
47 Util::logInitClass( $this );
48 $this->reload( $id, $type );
49 }
reload($id=null, $type=null)
static logInitClass($classInstance)

References Module\$id, Module\$type, Util\logInitClass(), and reload().

Member Function Documentation

◆ changePort()

BinMailpit::changePort ( $port,
$checkUsed = false,
$wbProgressBar = null )

Changes the SMTP port for the Mailpit service.

Parameters
int$portThe new port number.
bool$checkUsedWhether to check if the port is already in use.
mixed$wbProgressBarThe progress bar object for UI updates.
Returns
bool|int True if the port was successfully changed, or the process using the port if it is in use.

Definition at line 195 of file class.bin.mailpit.php.

196 {
197 global $bearsamppWinbinder;
198
199 if ( !Util::isValidPort( $port ) ) {
200 Util::logError( $this->getName() . ' port not valid: ' . $port );
201
202 return false;
203 }
204
205 $port = intval( $port );
206 $bearsamppWinbinder->incrProgressBar( $wbProgressBar );
207
208 $isPortInUse = Util::isPortInUse( $port );
209 if ( !$checkUsed || $isPortInUse === false ) {
210 // bearsampp.conf
211 $this->setSmtpPort( $port );
212 $bearsamppWinbinder->incrProgressBar( $wbProgressBar );
213
214 // conf
215 $this->update();
216 $bearsamppWinbinder->incrProgressBar( $wbProgressBar );
217
218 return true;
219 }
220
221 Util::logDebug( $this->getName() . ' port in used: ' . $port . ' - ' . $isPortInUse );
222
223 return $isPortInUse;
224 }
$port
setSmtpPort($smtpPort)
update($sub=0, $showWindow=false)
static logError($data, $file=null)
static isValidPort($port)
static logDebug($data, $file=null)
static isPortInUse($port)

References $port, Module\getName(), Util\isPortInUse(), Util\isValidPort(), Util\logDebug(), Util\logError(), setSmtpPort(), and Module\update().

◆ checkPort()

BinMailpit::checkPort ( $port,
$showWindow = false )

Checks if the specified port is used by the Mailpit service.

Parameters
int$portThe port number to check.
bool$showWindowWhether to show a message box with the result.
Returns
bool True if the port is used by the Mailpit service, false otherwise.

Definition at line 234 of file class.bin.mailpit.php.

235 {
236 global $bearsamppLang, $bearsamppWinbinder;
237 $boxTitle = sprintf( $bearsamppLang->getValue( Lang::CHECK_PORT_TITLE ), $this->getName(), $port );
238
239 if ( !Util::isValidPort( $port ) ) {
240 Util::logError( $this->getName() . ' port not valid: ' . $port );
241
242 return false;
243 }
244
245 $headers = Util::getHeaders( $this->listen, $port );
246 if ( !empty( $headers ) ) {
247 if ( Util::contains( $headers[0], 'Mailpit' ) ) {
248 Util::logDebug( $this->getName() . ' port ' . $port . ' is used by: ' . str_replace( '220 ', '', $headers[0] ) );
249 if ( $showWindow ) {
250 $bearsamppWinbinder->messageBoxInfo(
251 sprintf( $bearsamppLang->getValue( Lang::PORT_USED_BY ), $port, str_replace( '220 ', '', $headers[0] ) ),
252 $boxTitle
253 );
254 }
255
256 return true;
257 }
258 Util::logDebug( $this->getName() . ' port ' . $port . ' is used by another application' );
259 if ( $showWindow ) {
260 $bearsamppWinbinder->messageBoxWarning(
261 sprintf( $bearsamppLang->getValue( Lang::PORT_NOT_USED_BY ), $port ),
262 $boxTitle
263 );
264 }
265 }
266 else {
267 Util::logDebug( $this->getName() . ' port ' . $port . ' is not used' );
268 if ( $showWindow ) {
269 $bearsamppWinbinder->messageBoxError(
270 sprintf( $bearsamppLang->getValue( Lang::PORT_NOT_USED ), $port ),
271 $boxTitle
272 );
273 }
274 }
275
276 return false;
277 }
global $bearsamppLang
const PORT_NOT_USED_BY
const CHECK_PORT_TITLE
const PORT_USED_BY
const PORT_NOT_USED
static getHeaders($host, $port, $ssl=false)
static contains($string, $search)

References $bearsamppLang, $port, Lang\CHECK_PORT_TITLE, Util\contains(), Util\getHeaders(), Module\getName(), Util\isValidPort(), Util\logDebug(), Util\logError(), Lang\PORT_NOT_USED, Lang\PORT_NOT_USED_BY, and Lang\PORT_USED_BY.

◆ getExe()

BinMailpit::getExe ( )

Retrieves the executable file path for the Mailpit service.

Returns
string The executable file path.

Definition at line 420 of file class.bin.mailpit.php.

421 {
422 return $this->exe;
423 }

References $exe.

◆ getListen()

BinMailpit::getListen ( )

Retrieves the listen address for the Mailpit service.

Returns
string The listen address.

Definition at line 490 of file class.bin.mailpit.php.

491 {
492 return $this->listen;
493 }

References $listen.

◆ getLog()

BinMailpit::getLog ( )

Retrieves the log file path for the Mailpit service.

Returns
string The log file path.

Definition at line 410 of file class.bin.mailpit.php.

411 {
412 return $this->log;
413 }

References $log.

◆ getService()

BinMailpit::getService ( )

Retrieves the service object for the Mailpit service.

Returns
Win32Service The service object.

Definition at line 366 of file class.bin.mailpit.php.

367 {
368 return $this->service;
369 }

References $service.

◆ getSmtpPort()

BinMailpit::getSmtpPort ( )

Retrieves the SMTP port for the Mailpit service.

Returns
int The SMTP port.

Definition at line 470 of file class.bin.mailpit.php.

471 {
472 return $this->smtpPort;
473 }

References $smtpPort.

◆ getUiPort()

BinMailpit::getUiPort ( )

Retrieves the UI port for the Mailpit service.

Returns
int The UI port.

Definition at line 450 of file class.bin.mailpit.php.

451 {
452 return $this->uiPort;
453 }

References $uiPort.

◆ getWebRoot()

BinMailpit::getWebRoot ( )

Retrieves the web root directory for the Mailpit service.

Returns
string The web root directory.

Definition at line 430 of file class.bin.mailpit.php.

431 {
432 return $this->webRoot;
433 }

References $webRoot.

◆ rebuildConf()

BinMailpit::rebuildConf ( )

Rebuilds the configuration for the Mailpit service in the Windows Registry.

Returns
bool True if the configuration was successfully rebuilt, false otherwise.

Definition at line 165 of file class.bin.mailpit.php.

166 {
167 global $bearsamppRegistry;
168
169 $exists = $bearsamppRegistry->exists(
171 'SYSTEM\CurrentControlSet\Services\\' . self::SERVICE_NAME . '\Parameters',
173 );
174 if ( $exists ) {
175 return $bearsamppRegistry->setExpandStringValue(
177 'SYSTEM\CurrentControlSet\Services\\' . self::SERVICE_NAME . '\Parameters',
179 sprintf( self::SERVICE_PARAMS, $this->listen, $this->uiPort, $this->listen, $this->smtpPort, $this->webRoot )
180 );
181 }
182
183 return false;
184 }
const INFO_APP_PARAMETERS
const HKEY_LOCAL_MACHINE

References Registry\HKEY_LOCAL_MACHINE, and Nssm\INFO_APP_PARAMETERS.

◆ reload()

BinMailpit::reload ( $id = null,
$type = null )

Reloads the module configuration based on the provided ID and type.

Parameters
string | null$idThe ID of the module. If null, the current ID is used.
string | null$typeThe type of the module. If null, the current type is used.

Reimplemented from Module.

Definition at line 57 of file class.bin.mailpit.php.

58 {
60 Util::logReloadClass( $this );
61
62 $this->name = $bearsamppLang->getValue( Lang::MAILPIT );
63 $this->version = $bearsamppConfig->getRaw( self::ROOT_CFG_VERSION );
64 parent::reload( $id, $type );
65
66 $this->enable = $this->enable && $bearsamppConfig->getRaw( self::ROOT_CFG_ENABLE );
67 $this->service = new Win32Service( self::SERVICE_NAME );
68 $this->log = $bearsamppRoot->getLogsPath() . '/mailpit.log';
69
70 if ( $this->bearsamppConfRaw !== false ) {
71 $this->exe = $this->symlinkPath . '/' . $this->bearsamppConfRaw[self::LOCAL_CFG_EXE];
72 $this->webRoot = $this->bearsamppConfRaw[self::LOCAL_CFG_WEB_ROOT];
73 $this->uiPort = intval( $this->bearsamppConfRaw[self::LOCAL_CFG_UI_PORT] );
74 $this->smtpPort = intval( $this->bearsamppConfRaw[self::LOCAL_CFG_SMTP_PORT] );
75 $this->listen = $this->bearsamppConfRaw[self::LOCAL_CFG_LISTEN];
76 }
77
78 if ( !$this->enable ) {
79 Util::logInfo( $this->name . ' is not enabled!' );
80
81 return;
82 }
83 if ( !is_dir( $this->currentPath ) ) {
84 Util::logError( sprintf( $bearsamppLang->getValue( Lang::ERROR_FILE_NOT_FOUND ), $this->name . ' ' . $this->version, $this->currentPath ) );
85
86 return;
87 }
88 if ( !is_dir( $this->symlinkPath ) ) {
89 Util::logError( sprintf( $bearsamppLang->getValue( Lang::ERROR_FILE_NOT_FOUND ), $this->name . ' ' . $this->version, $this->symlinkPath ) );
90
91 return;
92 }
93 if ( !is_file( $this->bearsamppConf ) ) {
94 Util::logError( sprintf( $bearsamppLang->getValue( Lang::ERROR_CONF_NOT_FOUND ), $this->name . ' ' . $this->version, $this->bearsamppConf ) );
95
96 return;
97 }
98 if ( !is_file( $this->exe ) ) {
99 Util::logError( sprintf( $bearsamppLang->getValue( Lang::ERROR_EXE_NOT_FOUND ), $this->name . ' ' . $this->version, $this->exe ) );
100
101 return;
102 }
103 if ( (empty( $this->webRoot ) && $this->webRoot !== '' || is_numeric( $this->webRoot )) ) {
104 Util::logError( sprintf( $bearsamppLang->getValue( Lang::ERROR_INVALID_PARAMETER ), self::LOCAL_CFG_WEB_ROOT, $this->webRoot ) );
105
106 return;
107 }
108 if ( empty( $this->uiPort ) ) {
109 Util::logError( sprintf( $bearsamppLang->getValue( Lang::ERROR_INVALID_PARAMETER ), self::LOCAL_CFG_UI_PORT, $this->uiPort ) );
110
111 return;
112 }
113 if ( empty( $this->smtpPort ) ) {
114 Util::logError( sprintf( $bearsamppLang->getValue( Lang::ERROR_INVALID_PARAMETER ), self::LOCAL_CFG_SMTP_PORT, $this->smtpPort ) );
115
116 return;
117 }
118 if ( empty( $this->listen ) ) {
119 Util::logError( sprintf( $bearsamppLang->getValue( Lang::ERROR_INVALID_PARAMETER ), self::LOCAL_CFG_LISTEN, $this->listen ) );
120
121 return;
122 }
123
124 $nssm = new Nssm( self::SERVICE_NAME );
125 $nssm->setDisplayName( APP_TITLE . ' ' . $this->getName() );
126 $nssm->setBinPath( $this->exe );
127 $nssm->setParams( sprintf( self::SERVICE_PARAMS, $this->listen, $this->uiPort, $this->listen, $this->smtpPort, $this->webRoot ) );
128 $nssm->setStart( Nssm::SERVICE_DEMAND_START );
129 $nssm->setStdout( $bearsamppRoot->getLogsPath() . '/mailpit.out.log' );
130 $nssm->setStderr( $bearsamppRoot->getLogsPath() . '/mailpit.err.log' );
131
132 $this->service->setNssm( $nssm );
133 }
global $bearsamppRoot
const ERROR_FILE_NOT_FOUND
const ERROR_INVALID_PARAMETER
const ERROR_CONF_NOT_FOUND
const ERROR_EXE_NOT_FOUND
const MAILPIT
const SERVICE_DEMAND_START
static logReloadClass($classInstance)
static logInfo($data, $file=null)
global $bearsamppConfig
Definition homepage.php:26
const APP_TITLE
Definition root.php:12

References $bearsamppConfig, $bearsamppLang, $bearsamppRoot, Module\$id, Module\$type, APP_TITLE, Lang\ERROR_CONF_NOT_FOUND, Lang\ERROR_EXE_NOT_FOUND, Lang\ERROR_FILE_NOT_FOUND, Lang\ERROR_INVALID_PARAMETER, Module\getName(), LOCAL_CFG_EXE, LOCAL_CFG_LISTEN, LOCAL_CFG_WEB_ROOT, Util\logError(), Util\logInfo(), Util\logReloadClass(), Lang\MAILPIT, and Nssm\SERVICE_DEMAND_START.

Referenced by __construct(), setEnable(), and setVersion().

+ Here is the caller graph for this function:

◆ replaceAll()

BinMailpit::replaceAll ( $params)
protected

Replaces multiple key-value pairs in the configuration file.

Parameters
array$paramsAn associative array of key-value pairs to replace.

Reimplemented from Module.

Definition at line 140 of file class.bin.mailpit.php.

141 {
142 $content = file_get_contents( $this->bearsamppConf );
143
144 foreach ( $params as $key => $value ) {
145 $content = preg_replace( '|' . $key . ' = .*|', $key . ' = ' . '"' . $value . '"', $content );
146 $this->bearsamppConfRaw[$key] = $value;
147 switch ( $key ) {
149 $this->uiPort = intval( $value );
150 break;
152 $this->smtpPort = intval( $value );
153 break;
154 }
155 }
156
157 file_put_contents( $this->bearsamppConf, $content );
158 }
const LOCAL_CFG_SMTP_PORT

References LOCAL_CFG_SMTP_PORT, and LOCAL_CFG_UI_PORT.

◆ setEnable()

BinMailpit::setEnable ( $enabled,
$showWindow = false )

Enables or disables the Mailpit service.

Parameters
bool$enabledWhether to enable or disable the service.
bool$showWindowWhether to show a message box with the result.

Definition at line 377 of file class.bin.mailpit.php.

378 {
379 global $bearsamppConfig, $bearsamppLang, $bearsamppWinbinder;
380
381 if ( $enabled == Config::ENABLED && !is_dir( $this->currentPath ) ) {
382 Util::logDebug( $this->getName() . ' cannot be enabled because bundle ' . $this->getVersion() . ' does not exist in ' . $this->currentPath );
383 if ( $showWindow ) {
384 $bearsamppWinbinder->messageBoxError(
385 sprintf( $bearsamppLang->getValue( Lang::ENABLE_BUNDLE_NOT_EXIST ), $this->getName(), $this->getVersion(), $this->currentPath ),
386 sprintf( $bearsamppLang->getValue( Lang::ENABLE_TITLE ), $this->getName() )
387 );
388 }
389 $enabled = Config::DISABLED;
390 }
391
392 Util::logInfo( $this->getName() . ' switched to ' . ($enabled == Config::ENABLED ? 'enabled' : 'disabled') );
393 $this->enable = $enabled == Config::ENABLED;
394 $bearsamppConfig->replace( self::ROOT_CFG_ENABLE, $enabled );
395
396 $this->reload();
397 if ( $this->enable ) {
398 Util::installService( $this, $this->smtpPort, null, $showWindow );
399 }
400 else {
401 Util::removeService( $this->service, $this->name );
402 }
403 }
const DISABLED
const ENABLED
const ENABLE_TITLE
const ENABLE_BUNDLE_NOT_EXIST
static installService($bin, $port, $syntaxCheckCmd, $showWindow=false)
static removeService($service, $name)

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().

◆ setListen()

BinMailpit::setListen ( )

Sets the listen address for the Mailpit service.

Returns
bool True if the listen address was successfully set, false otherwise.

Definition at line 500 of file class.bin.mailpit.php.

501 {
502 return $this->replace( self::LOCAL_CFG_LISTEN, $this->listen );
503 }
replace($key, $value)

References Module\replace().

◆ setSmtpPort()

BinMailpit::setSmtpPort ( $smtpPort)

Sets the SMTP port for the Mailpit service.

Parameters
int$smtpPortThe SMTP port to set.

Definition at line 480 of file class.bin.mailpit.php.

481 {
482 $this->replace( self::LOCAL_CFG_SMTP_PORT, $smtpPort );
483 }

References $smtpPort, and Module\replace().

Referenced by changePort().

+ Here is the caller graph for this function:

◆ setUiPort()

BinMailpit::setUiPort ( $uiPort)

Sets the UI port for the Mailpit service.

Parameters
int$uiPortThe UI port to set.

Definition at line 460 of file class.bin.mailpit.php.

461 {
462 $this->replace( self::LOCAL_CFG_UI_PORT, $uiPort );
463 }

References $uiPort, and Module\replace().

◆ setVersion()

BinMailpit::setVersion ( $version)

Sets the version of the Mailpit service.

Parameters
string$versionThe version to set.

Reimplemented from Module.

Definition at line 353 of file class.bin.mailpit.php.

354 {
355 global $bearsamppConfig;
356 $this->version = $version;
357 $bearsamppConfig->replace( self::ROOT_CFG_VERSION, $version );
358 $this->reload();
359 }

References $bearsamppConfig, Module\$version, and reload().

Referenced by updateConfig().

+ Here is the caller graph for this function:

◆ setWebRoot()

BinMailpit::setWebRoot ( $webRoot)

Sets the web root directory for the Mailpit service.

Parameters
string$webRootThe web root directory to set.

Definition at line 440 of file class.bin.mailpit.php.

441 {
442 $this->replace( self::LOCAL_CFG_WEB_ROOT, $webRoot );
443 }

References $webRoot, and Module\replace().

◆ switchVersion()

BinMailpit::switchVersion ( $version,
$showWindow = false )

Switches the version of the Mailpit service.

Parameters
string$versionThe version to switch to.
bool$showWindowWhether to show a message box with the result.
Returns
bool True if the version was successfully switched, false otherwise.

Definition at line 287 of file class.bin.mailpit.php.

288 {
289 Util::logDebug( 'Switch ' . $this->name . ' version to ' . $version );
290
291 return $this->updateConfig( $version, 0, $showWindow );
292 }
updateConfig($version=null, $sub=0, $showWindow=false)

References Module\$version, Util\logDebug(), and updateConfig().

◆ updateConfig()

BinMailpit::updateConfig ( $version = null,
$sub = 0,
$showWindow = false )
protected

Updates the configuration for the Mailpit service.

Parameters
string | null$versionThe version to update to. If null, the current version is used.
int$subThe sub-level for logging indentation.
bool$showWindowWhether to show a message box with the result.
Returns
bool True if the configuration was successfully updated, false otherwise.

Reimplemented from Module.

Definition at line 303 of file class.bin.mailpit.php.

304 {
305 global $bearsamppLang, $bearsamppWinbinder;
306
307 if ( !$this->enable ) {
308 return true;
309 }
310
311 $version = $version == null ? $this->version : $version;
312 Util::logDebug( ($sub > 0 ? str_repeat( ' ', 2 * $sub ) : '') . 'Update ' . $this->name . ' ' . $version . ' config' );
313
314 $boxTitle = sprintf( $bearsamppLang->getValue( Lang::SWITCH_VERSION_TITLE ), $this->getName(), $version );
315
316 $bearsamppConf = str_replace( 'mailpit' . $this->getVersion(), 'mailpit' . $version, $this->bearsamppConf );
317 if ( !file_exists( $bearsamppConf ) ) {
318 Util::logError( 'bearsampp config files not found for ' . $this->getName() . ' ' . $version );
319 if ( $showWindow ) {
320 $bearsamppWinbinder->messageBoxError(
321 sprintf( $bearsamppLang->getValue( Lang::BEARSAMPP_CONF_NOT_FOUND_ERROR ), $this->getName() . ' ' . $version ),
322 $boxTitle
323 );
324 }
325
326 return false;
327 }
328
329 $bearsamppConfRaw = parse_ini_file( $bearsamppConf );
330 if ( $bearsamppConfRaw === false || !isset( $bearsamppConfRaw[self::ROOT_CFG_VERSION] ) || $bearsamppConfRaw[self::ROOT_CFG_VERSION] != $version ) {
331 Util::logError( 'bearsampp config file malformed for ' . $this->getName() . ' ' . $version );
332 if ( $showWindow ) {
333 $bearsamppWinbinder->messageBoxError(
334 sprintf( $bearsamppLang->getValue( Lang::BEARSAMPP_CONF_MALFORMED_ERROR ), $this->getName() . ' ' . $version ),
335 $boxTitle
336 );
337 }
338
339 return false;
340 }
341
342 // bearsampp.conf
343 $this->setVersion( $version );
344
345 return true;
346 }
setVersion($version)
const BEARSAMPP_CONF_NOT_FOUND_ERROR
const SWITCH_VERSION_TITLE
const BEARSAMPP_CONF_MALFORMED_ERROR

References Module\$bearsamppConf, Module\$bearsamppConfRaw, $bearsamppLang, Module\$version, Lang\BEARSAMPP_CONF_MALFORMED_ERROR, Lang\BEARSAMPP_CONF_NOT_FOUND_ERROR, Module\getName(), Module\getVersion(), Util\logDebug(), Util\logError(), setVersion(), and Lang\SWITCH_VERSION_TITLE.

Referenced by switchVersion().

+ Here is the caller graph for this function:

Field Documentation

◆ $exe

BinMailpit::$exe
private

Definition at line 33 of file class.bin.mailpit.php.

Referenced by getExe().

◆ $listen

BinMailpit::$listen
private

Definition at line 37 of file class.bin.mailpit.php.

Referenced by getListen().

◆ $log

BinMailpit::$log
private

Definition at line 31 of file class.bin.mailpit.php.

Referenced by getLog().

◆ $service

BinMailpit::$service
private

Definition at line 30 of file class.bin.mailpit.php.

Referenced by getService().

◆ $smtpPort

BinMailpit::$smtpPort
private

Definition at line 36 of file class.bin.mailpit.php.

Referenced by getSmtpPort(), and setSmtpPort().

◆ $uiPort

BinMailpit::$uiPort
private

Definition at line 35 of file class.bin.mailpit.php.

Referenced by getUiPort(), and setUiPort().

◆ $webRoot

BinMailpit::$webRoot
private

Definition at line 34 of file class.bin.mailpit.php.

Referenced by getWebRoot(), and setWebRoot().

◆ LOCAL_CFG_EXE

const BinMailpit::LOCAL_CFG_EXE = 'mailpitExe'

Definition at line 24 of file class.bin.mailpit.php.

Referenced by reload().

◆ LOCAL_CFG_LISTEN

const BinMailpit::LOCAL_CFG_LISTEN = 'mailpitListen'

Definition at line 28 of file class.bin.mailpit.php.

Referenced by reload().

◆ LOCAL_CFG_SMTP_PORT

const BinMailpit::LOCAL_CFG_SMTP_PORT = 'mailpitSmtpPort'

Definition at line 27 of file class.bin.mailpit.php.

Referenced by replaceAll().

◆ LOCAL_CFG_UI_PORT

const BinMailpit::LOCAL_CFG_UI_PORT = 'mailpitUiPort'

Definition at line 26 of file class.bin.mailpit.php.

Referenced by replaceAll().

◆ LOCAL_CFG_WEB_ROOT

const BinMailpit::LOCAL_CFG_WEB_ROOT = 'mailpitWebRoot'

Definition at line 25 of file class.bin.mailpit.php.

Referenced by reload().

◆ ROOT_CFG_ENABLE

const BinMailpit::ROOT_CFG_ENABLE = 'mailpitEnable'

Definition at line 21 of file class.bin.mailpit.php.

◆ ROOT_CFG_VERSION

const BinMailpit::ROOT_CFG_VERSION = 'mailpitVersion'

Definition at line 22 of file class.bin.mailpit.php.

◆ SERVICE_NAME

◆ SERVICE_PARAMS

const BinMailpit::SERVICE_PARAMS = ' --listen "%s:%d" --smtp "%s:%d" --webroot "%s"'

Definition at line 19 of file class.bin.mailpit.php.


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