39 if (self::$serviceMap ===
null) {
51 if (self::$syntaxCheckMap ===
null) {
52 self::$syntaxCheckMap = [
70 return isset(self::$serviceMap[$serviceName]) ? self::$serviceMap[$serviceName] :
null;
85 return isset(self::$syntaxCheckMap[$serviceName]) ? self::$syntaxCheckMap[$serviceName] :
null;
97 return $bin->getName() .
' ' . $bin->getVersion() .
' (' . $service->getName() .
')';
111 foreach (
$bearsamppBins->getServices() as $serviceName => $service) {
116 $callback($serviceName, $service, $bin, $syntaxCheckCmd);
129 public static function startService($bin, $syntaxCheckCmd =
null, $showErrors =
true)
142 return $service->stop();
153 return $service->restart();
182 if (self::$syntaxCheckMap ===
null) {
184 self::$syntaxCheckMap = [
190 return isset(self::$syntaxCheckMap[$serviceName]);
208 if (method_exists($bin,
'getPort')) {
209 return $bin->getPort();
210 } elseif (method_exists($bin,
'getSmtpPort')) {
211 return $bin->getSmtpPort();
static getServicePort($serviceName, $bearsamppBins)
static getServiceDisplayName($bin, $service)
static hasSyntaxCheck($serviceName)
static stopService($service)
static restartService($service)
static getSyntaxCheckCmd($serviceName, $bearsamppBins=null)
static startService($bin, $syntaxCheckCmd=null, $showErrors=true)
static getAllServiceNames()
static processServices($bearsamppBins, callable $callback)
static getBinFromServiceName($serviceName, $bearsamppBins)
static initializeMappings($bearsamppBins)
static startService($bin, $syntaxCheckCmd, $showWindow=false)