#171 Redo the configuration layer to add a ConfigBuilder and group configuration parts

This commit is contained in:
Stéphane Goetz
2019-12-05 21:25:58 +01:00
bovenliggende 688de1d5b9
commit b5633e93c7
47 gewijzigde bestanden met toevoegingen van 1177 en 710 verwijderingen

Bestand weergeven

@ -104,7 +104,7 @@ class Builder
$config = $parent->getConfig();
if (!in_array($file->getExtension(), $config['valid_content_extensions'])) {
if (!in_array($file->getExtension(), $config->getValidContentExtensions())) {
$uri = $file->getFilename();
$entry = new Raw($parent, $uri, $file);
@ -122,7 +122,7 @@ class Builder
$entry = new Content($parent, $uri, $file);
if ($entry->getUri() == $config['index_key']) {
if ($entry->getUri() == $config->getIndexKey()) {
if ($parent instanceof Root) {
$entry->setTitle($config->getTitle());
} else {
@ -184,7 +184,7 @@ class Builder
$path .= '.md';
}
$raw = !in_array($extension, $parent->getConfig()['valid_content_extensions']);
$raw = !in_array($extension, $parent->getConfig()->getValidContentExtensions());
$title = $uri = $path;
if (!$raw) {