flyskypie/regulation-odt

0.2.0 2020-02-20 03:00 UTC

This package is auto-updated.

Last update: 2024-09-20 13:15:58 UTC


README

生成法规的Open Document Text文件。

法规数组

章节、条款、段落、小节和项目应该是数组的键,而指向数组的值,即使没有子法规。

$regulationArray = [
    'Chapter 1' => [
        'Article 1' => [
            'Paragraph 1' => [
                'Subsection 1' => [
                    'Item 1' => [
                        'Item 1-1' => []
                    ]
                ]
            ]
        ],
        'Article 1' => []
    ]
];

用法

use FlySkyPie\RegulationODText\ODText;
$document = new ODText();
$document->setName('Name of Ragulation');
$document->setHistories(['amendment event', 'amendment event']);
$document->setCaptered(true);
$document->setRagulations($regulationArray);

章节化

如果法规没有章节化,请将setCaptered设置为false,您提供的法规数组可能看起来像

$array = [
  'Article 1' => [],
  'Article 2' => [],
  'Article 3' => [],
  'Article 4' => []
  ];