-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
42 lines (29 loc) · 927 Bytes
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# DocGenerator
Simple document generator.
Generate simple doc with simple code like:
````php
<?php
use App\DocumentGenerator;
use App\Enum\Align;
use App\Enum\TextAlign;
use App\Enum\TextDecoration;
use App\Model\Code\PHPCodeElement;
use App\Model\List\SimpleListElement;
use App\Model\Title\TitleElement;
require dirname(__DIR__).'/../vendor/autoload.php';
$document = new DocumentGenerator();
$document->addElement((new TitleElement('Doc Generator'))
->textAlign(TextAlign::CENTER)
->textDecorationStyle(TextDecoration::UNDERLINE_WAVY)
);
$document->addElement((new SimpleListElement())
->addStringElements(['Element 1', 'Element 2']));
$document->addElement((new PHPCodeElement('
$document->addElement((new SimpleListElement())
->addStringElements([\'Element 1\', \'Element 2\']));
'))
->align(Align::LEFT)
);
$document->render();
````
![](img.png)