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

Contact   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 25
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getExtensionNamespace() 0 4 1
A setAuthInfo() 0 7 2
1
<?php
2
namespace AfriCC\EPP\Extension\NASK\Info;
3
4
use AfriCC\EPP\ExtensionInterface;
5
use AfriCC\EPP\Frame\Command\Info\Contact as ContactInfo;
6
7
class Contact extends ContactInfo implements ExtensionInterface
8
{
9
10
    protected $extension = 'extcon';
11
    protected $extension_xmlns = 'http://www.dns.pl/nask-epp-schema/extcon-2.0';
12
13
    public function getExtensionNamespace()
14
    {
15
        return $this->extension_xmlns;
16
    }
17
18
    /**
19
     * Set contact authinfo
20
     *
21
     * @param string $pw authinfo
22
     * @param string $roid If specified, authinfo is of domain whose registrant is this contact
23
     */
24
    public function setAuthInfo($pw, $roid = null){
25
        $node = $this->set('//epp:epp/epp:command/epp:extension/extcon:info/extcon:authInfo/extcon:pw', $pw);
26
27
        if ($roid !== null) {
28
            $node->setAttribute('roid', $roid);
29
        }
30
    }
31
}
32
33