interface ConfigInterface

Methods

array
getListeners()

Get all listeners

Listener|null
getListenerByPort(int $port)

TODO: rename to getListenerByPort() and add validation (should be parse)

bool
uploadListener(Listener $listener)

Upload Listener object to Nginx Unit server

bool
uploadListenerFromFile(string $path, string $listener)

Upload configuration from file

bool
removeListener(Listener $listener)

No description

array
getRoutes()

No description

Route|null
getRoute(string $routeName)

No description

bool
removeRoutes()

Remove all routes and linked listeners

bool
removeRoute(Route|string $route)

No description

array
getApplications()

No description

ApplicationAbstract|null
getApplication($applicationName)

No description

bool
uploadApplication(ApplicationAbstract $application, string $name = '')

Upload application to Nginx Unit

bool
uploadApplicationFromFile(string $path, string $name)

Upload application to Nginx Unit from file

bool
removeApplication(ApplicationAbstract|string $application)

No description

array
getUpstreams()

Get all upstreams

bool
uploadUpstream(Upstream $upstream, string $name)

Upload Upstream object to nginx Unit

bool
uploadUpstreamsFromFile(string $path)

Upload all upstreams from file to Nginx Unit

bool
setAccessLog($path, $format = null)

Setup access log file

AccessLog|null
getAccessLog()

Return access log if exists

bool
removeAccessLog()

Remove access log

array
toArray()

No description

Details

at line 18
array getListeners()

Get all listeners

Return Value

array

at line 26
Listener|null getListenerByPort(int $port)

TODO: rename to getListenerByPort() and add validation (should be parse)

Parameters

int $port

Return Value

Listener|null

at line 34
bool uploadListener(Listener $listener)

Upload Listener object to Nginx Unit server

Parameters

Listener $listener

Return Value

bool

at line 43
bool uploadListenerFromFile(string $path, string $listener)

Upload configuration from file

Parameters

string $path
string $listener

Return Value

bool

at line 49
bool removeListener(Listener $listener)

No description

Parameters

Listener $listener

Return Value

bool

at line 54
array getRoutes()

No description

Return Value

array

at line 60
Route|null getRoute(string $routeName)

No description

Parameters

string $routeName

Return Value

Route|null

at line 67
bool removeRoutes()

Remove all routes and linked listeners

Return Value

bool

at line 73
bool removeRoute(Route|string $route)

No description

Parameters

Route|string $route

Return Value

bool

at line 78
array getApplications()

No description

Return Value

array

at line 84
ApplicationAbstract|null getApplication($applicationName)

No description

Parameters

$applicationName

Return Value

ApplicationAbstract|null

at line 93
bool uploadApplication(ApplicationAbstract $application, string $name = '')

Upload application to Nginx Unit

Parameters

ApplicationAbstract $application
string $name

Return Value

bool

at line 102
bool uploadApplicationFromFile(string $path, string $name)

Upload application to Nginx Unit from file

Parameters

string $path
string $name

Return Value

bool

at line 108
bool removeApplication(ApplicationAbstract|string $application)

No description

Parameters

ApplicationAbstract|string $application

Return Value

bool

at line 115
array getUpstreams()

Get all upstreams

Return Value

array

at line 124
bool uploadUpstream(Upstream $upstream, string $name)

Upload Upstream object to nginx Unit

Parameters

Upstream $upstream
string $name

Return Value

bool

at line 132
bool uploadUpstreamsFromFile(string $path)

Upload all upstreams from file to Nginx Unit

Parameters

string $path

Return Value

bool

at line 141
bool setAccessLog($path, $format = null)

Setup access log file

Parameters

$path
$format

Return Value

bool

at line 148
AccessLog|null getAccessLog()

Return access log if exists

Return Value

AccessLog|null

at line 155
bool removeAccessLog()

Remove access log

Return Value

bool

at line 160
array toArray()

No description

Return Value

array