Completed
Pull Request — master (#67)
by
unknown
01:18
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\Create;
4
5
use AfriCC\EPP\ExtensionInterface;
6
use AfriCC\EPP\Frame\Command\Create\Contact as ContactCreate;
7
8
class Contact extends ContactCreate implements ExtensionInterface
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 entity type of contact
20
     *
21
     * @param bool $individual True if person, false if company
22
     */
23
    public function setIndividual($individual = false)
24
    {
25
        $this->set('//epp:epp/epp:command/epp:extension/extcon:create/extcon:individual', $individual ? 1 : 0);
26
    }
27
28
    /**
29
     * Set consent for publishing
30
     *
31
     * Don't use
32
     *
33
     * Ignored since 6.1.19
34
     * Up until 6.1.19 this HAD to be true if Individual was to be False
35
     *
36
     * @deprecated Since NASK registry 6.1.19, removed in registry 6.2.1
37
     *
38
     * @param bool $consent
39
     */
40
    public function setConsentForPublishing($consent = false)
41
    {
42
        $this->set('//epp:epp/epp:command/epp:extension/extcon:create/extcon:consentForPublishing', $consent ? 1 : 0);
43
    }
44
}
45