IQRF PHP service manager

SupervisordManager
in package
implements IServiceManager

Tool for managing services (supervisord init daemon in a Docker container)

Table of Contents

Interfaces

IServiceManager
Interface for tools for managing service

Properties

$commandManager  : CommandExecutor

Methods

__construct()  : mixed
Constructor
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)

Properties

Methods

__construct()

Constructor

public __construct(CommandExecutor $commandManager) : mixed
Parameters
$commandManager : CommandExecutor

Command manager

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
throws
NotImplementedException

The method is not implemented

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
throws
NotImplementedException

The method is not implemented

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?

Return values
ServiceState

Service state

getStatus()

Returns status of the service

public getStatus(string $serviceName) : string
Parameters
$serviceName : string

Service name

Return values
string

Service status

isActive()

Checks if the service is active

public isActive(string $serviceName) : bool
Parameters
$serviceName : string

Service name

Tags
throws
NotImplementedException

The method is not implemented

Return values
bool

Is service active?

isEnabled()

Checks if the service is enabled

public isEnabled(string $serviceName) : bool
Parameters
$serviceName : string

Service name

Tags
throws
NotImplementedException

The method is not implemented

Return values
bool

Is service enabled?

restart()

Restarts the service

public restart(string $serviceName) : void
Parameters
$serviceName : string

Service name

start()

Starts service(s)

public start(string|array<string|int, string> $services) : void
Parameters
$services : string|array<string|int, string>

Service name(s)

stop()

Stops service(s)

public stop(string|array<string|int, string> $services) : void
Parameters
$services : string|array<string|int, string>

Service name(s)


        
On this page

Search results