AbstractConfig::doLoad()
last analyzed

Size

Total Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 1
c 0
b 0
f 0
nc 1
1
<?php
2
namespace DICIT\Config;
3
4
abstract class AbstractConfig
5
{
6
    protected $data = array();
7
8
    public function load($force = false)
9
    {
10
        if ($force || empty($this->data)) {
11
            $this->data = $this->doLoad();
12
        }
13
14
        return $this->data;
15
    }
16
17
    public function getData()
18
    {
19
        return $this->data;
20
    }
21
22
    abstract protected function doLoad();
23
}
24