Completed
Push — master ( 3b3aeb...14bab3 )
by
unknown
01:16
created

ObjectSpec::restoreParent()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 2
nc 2
nop 0
1
<?php
2
3
namespace AfriCC\EPP\Extension\NASK;
4
5
use AfriCC\EPP\ObjectSpec as MainObjectSpec;
6
7
class ObjectSpec extends MainObjectSpec
8
{
9
    public static $specs = [
10
        'epp' => [
11
            'xmlns' => 'http://www.dns.pl/nask-epp-schema/epp-2.0',
12
        ],
13
        'domain' => [
14
            'xmlns' => 'http://www.dns.pl/nask-epp-schema/domain-2.0',
15
        ],
16
        'host' => [
17
            'xmlns' => 'http://www.dns.pl/nask-epp-schema/host-2.0',
18
        ],
19
        'contact' => [
20
            'xmlns' => 'http://www.dns.pl/nask-epp-schema/contact-2.0',
21
        ],
22
        'future' => [
23
            'xmlns' => 'http://www.dns.pl/nask-epp-schema/future-2.0',
24
        ],
25
        'secDNS' => [
26
            'xmlns' => 'http://www.dns.pl/nask-epp-schema/secDNS-2.0',
27
        ],
28
29
    ];
30
31
    public static $services = [
32
        'http://www.dns.pl/nask-epp-schema/contact-2.0',
33
        'http://www.dns.pl/nask-epp-schema/host-2.0',
34
        'http://www.dns.pl/nask-epp-schema/domain-2.0',
35
        'http://www.dns.pl/nask-epp-schema/future-2.0',
36
    ];
37
38
    public static $serviceExtensions = [
39
        'http://www.dns.pl/nask-epp-schema/extcon-2.0',
40
        'http://www.dns.pl/nask-epp-schema/extdom-2.0',
41
        'http://www.dns.pl/nask-epp-schema/secDNS-2.0',
42
    ];
43
44
    private static $backup;
45
46
    public static function overwriteParent()
47
    {
48
        self::$backup = MainObjectSpec::$specs;
49
        MainObjectSpec::$specs = self::$specs;
50
    }
51
52
    public static function restoreParent()
53
    {
54
        if (!empty(self::$backup)) {
55
            MainObjectSpec::$specs = self::$backup;
56
        }
57
    }
58
}
59