Skip to content
This repository was archived by the owner on Oct 22, 2025. It is now read-only.

Commit 536d7b8

Browse files
Pavlusha311245gitbook-bot
authored andcommitted
GITBOOK-3: Update doc
1 parent 944cedb commit 536d7b8

24 files changed

+287
-33
lines changed

docs/README.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ This project allows developers to interact with the Nginx Unit web server throug
1212

1313
You can easy start work with SDK with Quick start guide below:
1414

15-
{% content-ref url="quick-start-in-development.md" %}
16-
[quick-start-in-development.md](quick-start-in-development.md)
15+
{% content-ref url="quick-start.md" %}
16+
[quick-start.md](quick-start.md)
1717
{% endcontent-ref %}
1818

1919
## Want to learn SDK deeper?
@@ -23,3 +23,13 @@ Dive a deeper and start exploring our SDK API reference:
2323
{% content-ref url="reference/api-reference/" %}
2424
[api-reference](reference/api-reference/)
2525
{% endcontent-ref %}
26+
27+
## Changelog
28+
29+
More information about changes you can see here
30+
31+
## Contribution
32+
33+
More info about contribution you can read [here](https://docs.github.com/en/get-started/quickstart/contributing-to-projects)
34+
35+
## _THIS PACKAGE IN DEVELOPMENT DON'T USE IT IN PRODUCTION_

docs/SUMMARY.md

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,23 @@
11
# Table of contents
22

33
* [Welcome!](README.md)
4-
* [Quick Start (In development)](quick-start-in-development.md)
4+
* [Quick Start](quick-start.md)
55

66
## Reference
77

88
* [API Reference](reference/api-reference/README.md)
9-
* [Unit](reference/api-reference/unit.md)
10-
* [Statistics](reference/api-reference/statistics.md)
11-
* [Config (In development)](reference/api-reference/config-in-development.md)
12-
* [Certificates (In development)](reference/api-reference/certificates-in-development.md)
13-
* [Listeners (In development)](reference/api-reference/listeners-in-development.md)
14-
* [Routes (In development)](reference/api-reference/routes-in-development.md)
15-
* [Applications (In development)](reference/api-reference/applications-in-development.md)
9+
* [Classes](reference/api-reference/classes/README.md)
10+
* [Unit](reference/api-reference/classes/unit/README.md)
11+
* [Statistic](reference/api-reference/classes/unit/statistic.md)
12+
* [Config](reference/api-reference/classes/unit/config/README.md)
13+
* [Listener](reference/api-reference/classes/unit/config/listener.md)
14+
* [Route (In development)](reference/api-reference/classes/unit/config/route-in-development/README.md)
15+
* [RouteBlock (In development)](reference/api-reference/classes/unit/config/route-in-development/routeblock-in-development/README.md)
16+
* [RouteAction](reference/api-reference/classes/unit/config/route-in-development/routeblock-in-development/routeaction.md)
17+
* [RouteMatch](reference/api-reference/classes/unit/config/route-in-development/routeblock-in-development/routematch.md)
18+
* [Application (In development)](reference/api-reference/classes/unit/config/application-in-development.md)
19+
* [Certificate (In development)](reference/api-reference/classes/unit/certificate-in-development.md)
20+
* [Interfaces](reference/api-reference/interfaces/README.md)
21+
* [UnitInterface](reference/api-reference/interfaces/unitinterface.md)
22+
* [ConfigInterface](reference/api-reference/interfaces/configinterface.md)
23+
* [StatisticInterface](reference/api-reference/interfaces/statisticinterface.md)

docs/quick-start-in-development.md

Lines changed: 0 additions & 2 deletions
This file was deleted.

docs/quick-start.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
description: This page wants help you to start using package
3+
---
4+
5+
# Quick Start
6+
7+
## Pre-requirements
8+
9+
* PHP >= 8.2
10+
* PHP curl extension
11+
* [Composer](https://getcomposer.org/download/) >= 2
12+
13+
## Installation
14+
15+
1. Create folder `mkdir example-php-project`
16+
2. Open folder `cd example-php-project`
17+
3. Init composer `composer init`
18+
4. Add package `composer require pavlusha311245/unit-php-sdk`
19+
20+
Congratulations. You installed package. Now you can use the full power of this SDK. 
21+
22+
#### Happy coding 😊

docs/reference/api-reference/applications-in-development.md

Lines changed: 0 additions & 2 deletions
This file was deleted.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Classes
2+
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
description: This is main class of Nginx Unit manipulation
3+
---
4+
5+
# Unit
6+
7+
## Properties
8+
9+
### string $socket (Private readonly)
10+
11+
Contains path to socket
12+
13+
### string $address (Private readonly)
14+
15+
Contains http path
16+
17+
## Methods:
18+
19+
### `__construct(string $socket, string $address)`
20+
21+
### `getSocket()`
22+
23+
_Return type: String_
24+
25+
### `getAddress()`
26+
27+
_Return type: String_
28+
29+
### `getConfig()`
30+
31+
_Return type:_ [_Config_](config/)
32+
33+
### `getStatistics()`
34+
35+
_Return type:_ [_Statistic_](statistic.md)
36+
37+
### `getCertificates()`
38+
39+
_Return type:_ [_Certificate_](certificate-in-development.md)
File renamed without changes.
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
---
2+
description: This class contains Nginx Unit config data
3+
---
4+
5+
# Config
6+
7+
## Properties
8+
9+
### $\_listeners (Private)
10+
11+
Contains array of values
12+
13+
### $\_routes (Private)
14+
15+
Contains array of values
16+
17+
### $\_applications (Private)
18+
19+
Contains array of values
20+
21+
### $\_upstreams (Private)
22+
23+
Contains array of values
24+
25+
## Methods
26+
27+
### `__construct(array $data)`
28+
29+
_Return type: Void_
30+
31+
### `getListeners()`
32+
33+
_Return type: Array_
34+
35+
### `getApplications()`
36+
37+
_Return type: Array_
38+
39+
### `getApplication($applicationName)`
40+
41+
Params:
42+
43+
* $applicationName - Existing application name from Nginx Unit config
44+
45+
_Return type:_ [_Application_](application-in-development.md)
46+
47+
### `getRoutes()`
48+
49+
_Return type: Array_
50+
51+
### `getRoute($routeName)`
52+
53+
Params:
54+
55+
* $routeName - Existing route name from Nginx Unit config
56+
57+
_Return type:_ [_Route_](route-in-development/)
58+
59+
### `getUpstreams()`
60+
61+
_Return type: Mixed_
62+
63+
### `setApplicationLogPath($path) - (In development)`
64+
65+
### `setApplicationLogFormat($format) - (In development)`
66+
67+
### `toArray()`
68+
69+
_Return type: Array_
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
description: This class presents "application" section from config
3+
---
4+
5+
# Application (In development)
6+

0 commit comments

Comments
 (0)