xref: /dokuwiki/lib/plugins/config/core/Configuration.php (revision 5a38a129ffe7e1949e690730ee9157988de617c0)
1<?php
2/**
3 * Configuration Class
4 *
5 * @author  Chris Smith <chris@jalakai.co.uk>
6 * @author  Ben Coburn <btcoburn@silicodon.net>
7 */
8
9namespace dokuwiki\plugin\config\core;
10
11/**
12 * Class configuration
13 */
14class Configuration {
15
16    const KEYMARKER = '____';
17
18    /** @var ConfigSettings FIXME better name? */
19    protected $confset;
20
21
22    /**
23     * constructor
24     */
25    public function __construct() {
26        $this->confset = new ConfigSettings();
27    }
28
29    /**
30     * Stores setting[] array to file
31     *
32     * @return bool succesful?
33     */
34    public function save_settings() {
35        $writer = new Writer();
36        try {
37            $writer->save($this->confset->getSettings());
38        } catch(\Exception $e) {
39            // fixme show message
40            return false;
41        }
42        return true;
43    }
44
45
46}
47
48