Completed
Pull Request — master (#84)
by
unknown
01:28
created

Contact::getExtensionNamespace()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

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