\App\ServiceModule\ModelsServiceManager

Tool for managing services

Summary

Methods
Properties
Constants
__construct()
disable()
enable()
isActive()
isEnabled()
start()
stop()
restart()
getStatus()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$initDaemon
$initDaemons
N/A

Properties

$initDaemon

$initDaemon : \App\ServiceModule\Models\IServiceManager

Type

normal — Init daemon service manager

$initDaemons

$initDaemons : string[]

Type

normal — Init daemon service managers

Methods

__construct()

__construct(string  $initDaemon, \App\CoreModule\Models\CommandManager  $commandManager) : mixed

Constructor

Parameters

string $initDaemon

Init daemon

\App\CoreModule\Models\CommandManager $commandManager

Command manager

Returns

mixed

disable()

disable(?string  $serviceName = null) : void

Disables the service

Parameters

?string $serviceName

Throws

\App\ServiceModule\Exceptions\NotImplementedException
\App\ServiceModule\Exceptions\UnsupportedInitSystemException

enable()

enable(?string  $serviceName = null) : void

Enables the service

Parameters

?string $serviceName

Throws

\App\ServiceModule\Exceptions\NotImplementedException
\App\ServiceModule\Exceptions\UnsupportedInitSystemException

isActive()

isActive(?string  $serviceName = null) : bool

Checks if the service is active

Parameters

?string $serviceName

Throws

\App\ServiceModule\Exceptions\NotImplementedException
\App\ServiceModule\Exceptions\UnsupportedInitSystemException

Returns

bool

isEnabled()

isEnabled(?string  $serviceName = null) : bool

Checks if the service is enabled

Parameters

?string $serviceName

Throws

\App\ServiceModule\Exceptions\NotImplementedException
\App\ServiceModule\Exceptions\UnsupportedInitSystemException

Returns

bool

start()

start(?string  $serviceName = null) : void

Starts the service

Parameters

?string $serviceName

Throws

\App\ServiceModule\Exceptions\UnsupportedInitSystemException

stop()

stop(?string  $serviceName = null) : void

Stops the service

Parameters

?string $serviceName

Throws

\App\ServiceModule\Exceptions\UnsupportedInitSystemException

restart()

restart(?string  $serviceName = null) : void

Restarts the service

Parameters

?string $serviceName

Throws

\App\ServiceModule\Exceptions\UnsupportedInitSystemException

getStatus()

getStatus(?string  $serviceName = null) : string

Returns status of the service

Parameters

?string $serviceName

Throws

\App\ServiceModule\Exceptions\UnsupportedInitSystemException

Returns

string —

Service status