60b50919b4
Set configurations in an Object instead of an array
24 lignes
690 B
PHP
24 lignes
690 B
PHP
<?php namespace Todaymade\Daux\Generator;
|
|
|
|
use Todaymade\Daux\Daux;
|
|
use Todaymade\Daux\Format\HTML\Generator as HTMLGenerator;
|
|
use Todaymade\Daux\Format\Confluence\Generator as ConfluenceGenerator;
|
|
|
|
class Generator
|
|
{
|
|
public function generate($options)
|
|
{
|
|
$daux = new Daux(Daux::STATIC_MODE);
|
|
$daux->initialize($options['config']);
|
|
|
|
switch(strtolower($options['format'])) {
|
|
case 'confluence':
|
|
(new ConfluenceGenerator())->generate($daux, $options['destination']);
|
|
break;
|
|
case 'html':
|
|
default:
|
|
(new HTMLGenerator())->generate($daux, $options['destination']);
|
|
}
|
|
}
|
|
}
|