Completed
Push — master ( 243457...d2eaaf )
by Michael
01:33
created

Helper::getDirname()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php namespace Xoopsmodules\xsitemap;
2
3
/**
4
 * Class Helper
5
 */
6
class Helper extends \Xmf\Module\Helper
7
{
8
    public $debug;
9
10
    /**
11
     * @internal param $debug
12
     * @param bool $debug
13
     */
14
    protected function __construct($debug = false)
15
    {
16
        $this->debug   = $debug;
17
        $this->dirname = basename(dirname(__DIR__));
18
    }
19
20
    /**
21
     * @param bool $debug
22
     *
23
     * @return \Xmf\Module\Helper
24
     */
25
    public static function getInstance($debug = false)
26
    {
27
        static $instance;
28
        if (null === $instance) {
29
            $instance = new static($debug);
30
        }
31
32
        return $instance;
33
    }
34
35
    /**
36
     * @return string
37
     */
38
    public function getDirname()
39
    {
40
        return $this->dirname;
41
    }
42
}
43