Remove "default.json" concentrate all configurations in "global.json"

Set configurations in an Object instead of an array
This commit is contained in:
Stéphane Goetz
2015-06-29 16:11:01 +02:00
committed by Stéphane Goetz
parent 100568bfbb
commit 60b50919b4
7 changed files with 92 additions and 68 deletions

View File

@ -1,6 +1,7 @@
<?php namespace Todaymade\Daux\Format\Base;
use League\CommonMark\CommonMarkConverter;
use Todaymade\Daux\Config;
use Todaymade\Daux\Tree\Content;
abstract class MarkdownPage extends SimplePage
@ -11,7 +12,7 @@ abstract class MarkdownPage extends SimplePage
protected $file;
/**
* @var array
* @var Config
*/
protected $params;
@ -25,7 +26,7 @@ abstract class MarkdownPage extends SimplePage
$this->file = $file;
}
public function setParams(array $params)
public function setParams(Config $params)
{
$this->params = $params;
}

View File

@ -1,5 +1,6 @@
<?php namespace Todaymade\Daux\Format\Confluence;
use Todaymade\Daux\Config;
use Todaymade\Daux\Daux;
use Todaymade\Daux\Tree\Content;
use Todaymade\Daux\Tree\Directory;
@ -31,7 +32,7 @@ class Generator
echo "Done !\n";
}
private function generateRecursive(Entry $tree, array $params, $base_url = '')
private function generateRecursive(Entry $tree, Config $params, $base_url = '')
{
$final = ['title' => $this->prefix . $tree->getTitle()];
$params['base_url'] = $params['base_page'] = $base_url;