Completed
Pull Request — master (#67)
by
unknown
01:33
created

ObjectSpec::restoreParent()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 10
c 0
b 0
f 0
cc 2
nc 2
nop 0
1
<?php
2
namespace AfriCC\EPP\Extension\NASK;
3
4
use AfriCC\EPP\ObjectSpec as MainObjectSpec;
5
6
class ObjectSpec extends MainObjectSpec
7
{
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
        self::$backup = MainObjectSpec::$specs;
48
        MainObjectSpec::$specs = self::$specs;
49
    }
50
    
51
    public static function restoreParent() {
52
        if(!empty(self::$backup)){
53
            MainObjectSpec::$specs = self::$backup; 
54
        }
55
    }
56
    
57
    
58
}
59
60