Completed
Push — master ( 22c257...e714e6 )
by Gabriel
13:14 queued 10:09
created

XML::load()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 3
dl 0
loc 4
ccs 0
cts 3
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Nip\View;
4
5
use Nip\View;
6
7
class XML extends View
8
{
9
    public function load($view = false, $variables = array(), $return = false)
10
    {
11
        header('Content-type: text/xml');
12
        return parent::load($view, $variables, $return);
13
    }
14
15
    /**
16
     * Singleton
17
     *
18
     * @return self
19
     */
20
    public static function instance()
21
    {
22
        static $instance;
23
        if (!($instance instanceof self)) {
24
            $instance = new self();
25
        }
26
        return $instance;
27
    }
28
}
29