andrelec1/docgenerator

该软件包最新版本(1.0.3)没有提供许可证信息。

LaTeX 并发

1.0.3 2022-02-27 01:52 UTC

This package is auto-updated.

Last update: 2024-09-29 03:15:36 UTC


README

# 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)