Commit 1b043a74 authored by Laurent Lecluse's avatar Laurent Lecluse
Browse files

Mise en place du système de génération de documents avec LibreOffice et Unoconv

parent bfc492c8
Loading
Loading
Loading
Loading

src/Data.php

0 → 100644
+61 −0
Original line number Diff line number Diff line
<?php

namespace Unicaen\OpenDocument;

use Exception;
use DOMDocument;
use ZipArchive;

/**
 * Class Data
 * @todo à terminer : non fonctionnel
 * @package Unicaen\OpenDocument
 */
class Data
{
    const PERIMETRE_TAB_LIGNE = 'table:table-row';
    const PERIMETRE_FRAME     = 'draw:frame';
    const PERIMETRE_LIST_ITEM = 'text:list-item';

    /**
     * @var string[]
     */
    public $variables = [];

    /**
     * @var
     */
    public $subDataVariable;

    /**
     * @var
     */
    public $subDataPerimetre;

    /**
     * @var Data[]
     */
    public $subData = [];



    public static function create(array $variables = [])
    {
        $data            = new self;
        $data->variables = $variables;

        return $data;
    }



    public function addSubData(string $variable, string $perimetre, array $variables = [])
    {
        $subData                   = new self;
        $subData->subDataVariable  = $variable;
        $subData->subDataPerimetre = $perimetre;
        $subData->variables        = $variables;

        return $subData;
    }
}
 No newline at end of file

src/Document.php

0 → 100644
+822 −0

File added.

Preview size limit exceeded, changes collapsed.

src/Publisher.php

0 → 100644
+433 −0

File added.

Preview size limit exceeded, changes collapsed.

src/Stylist.php

0 → 100644
+248 −0

File added.

Preview size limit exceeded, changes collapsed.