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