Bearsampp
2025.8.29
Loading...
Searching...
No Matches
class.action.checkPort.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
16
class
ActionCheckPort
17
{
28
public
function
__construct
($args)
29
{
30
global
$bearsamppBins
;
31
32
// Check if the required arguments are provided and not empty
33
if
( isset( $args[0] ) && !empty( $args[0] ) && isset( $args[1] ) && !empty( $args[1] ) ) {
34
// Determine if SSL is to be used
35
$ssl = isset( $args[2] ) && !empty( $args[2] );
36
37
// Check the port for the specified service
38
if
( $args[0] ==
$bearsamppBins
->getApache()->getName() ) {
39
$bearsamppBins
->getApache()->checkPort( $args[1], $ssl,
true
);
40
}
41
elseif ( $args[0] ==
$bearsamppBins
->getMysql()->getName() ) {
42
$bearsamppBins
->getMysql()->checkPort( $args[1],
true
);
43
}
44
elseif ( $args[0] ==
$bearsamppBins
->getMariadb()->getName() ) {
45
$bearsamppBins
->getMariadb()->checkPort( $args[1],
true
);
46
}
47
elseif ( $args[0] ==
$bearsamppBins
->getPostgresql()->getName() ) {
48
$bearsamppBins
->getPostgresql()->checkPort( $args[1],
true
);
49
}
50
elseif ( $args[0] ==
$bearsamppBins
->getMailpit()->getName() ) {
51
$bearsamppBins
->getMailpit()->checkPort( $args[1],
true
);
52
}
53
elseif ( $args[0] ==
$bearsamppBins
->getMemcached()->getName() ) {
54
$bearsamppBins
->getMemcached()->checkPort( $args[1],
true
);
55
}
56
elseif ( $args[0] ==
$bearsamppBins
->getXlight()->getName() ) {
57
$bearsamppBins
->getXlight()->checkPort( $args[1],
true
);
58
}
59
}
60
}
61
}
$bearsamppBins
global $bearsamppBins
Definition
ajax.apache.php:16
ActionCheckPort
Definition
class.action.checkPort.php:17
ActionCheckPort\__construct
__construct($args)
Definition
class.action.checkPort.php:28
Bearsampp-development
sandbox
core
classes
actions
class.action.checkPort.php
Generated by
1.14.0