IServiceManager
in
Interface for tools for managing service
Table of Contents
Methods
- disable() : void
- Disables service(s)
- enable() : void
- Enables service(s)
- getState() : ServiceState
- Returns state of the service
- getStatus() : string
- Returns status of the service
- isActive() : bool
- Checks if the service is active
- isEnabled() : bool
- Checks if the service is enabled
- restart() : void
- Restarts the service
- start() : void
- Starts service(s)
- stop() : void
- Stops service(s)
Methods
disable()
Disables service(s)
public
disable(string|array<string|int, string> $services[, bool $stop = true ]) : void
Parameters
- $services : string|array<string|int, string>
-
Service name(s)
- $stop : bool = true
-
Stop service(s) after disabling
Tags
enable()
Enables service(s)
public
enable(string|array<string|int, string> $services[, bool $start = true ]) : void
Parameters
- $services : string|array<string|int, string>
-
Service name(s)
- $start : bool = true
-
Start service(s) after enabling
Tags
getState()
Returns state of the service
public
getState(string $serviceName[, bool $withStatus = false ]) : ServiceState
Parameters
- $serviceName : string
-
Service name
- $withStatus : bool = false
-
Include service status?
Tags
Return values
ServiceState —Service state
getStatus()
Returns status of the service
public
getStatus(string $serviceName) : string
Parameters
- $serviceName : string
-
Service name
Tags
Return values
string —Service status
isActive()
Checks if the service is active
public
isActive(string $serviceName) : bool
Parameters
- $serviceName : string
-
Service name
Tags
Return values
bool —Is service active?
isEnabled()
Checks if the service is enabled
public
isEnabled(string $serviceName) : bool
Parameters
- $serviceName : string
-
Service name
Tags
Return values
bool —Is service enabled?
restart()
Restarts the service
public
restart(string $serviceName) : void
Parameters
- $serviceName : string
-
Service name
Tags
start()
Starts service(s)
public
start(string|array<string|int, string> $services) : void
Parameters
- $services : string|array<string|int, string>
-
Service name(s)
Tags
stop()
Stops service(s)
public
stop(string|array<string|int, string> $services) : void
Parameters
- $services : string|array<string|int, string>
-
Service name(s)