Completed
Push — master ( c87337...703ea3 )
by
unknown
01:28
created

Contact::setIndividual()   A

Complexity

Conditions 2
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 2
nc 1
nop 1
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
    /**
14
     * Set entity type of contact
15
     *
16
     * @param bool $individual True if person, false if company
17
     */
18
    public function setIndividual($individual = false)
19
    {
20
        $this->set('//epp:epp/epp:command/epp:extension/extcon:create/extcon:individual', $individual ? 1 : 0);
21
    }
22
23
    /**
24
     * Set consent for publishing
25
     *
26
     * Don't use
27
     *
28
     * Ignored since 6.1.19
29
     * Up until 6.1.19 this HAD to be true if Individual was to be False
30
     *
31
     * @deprecated Since NASK registry 6.1.19, removed in registry 6.2.1
32
     *
33
     * @param bool $consent
34
     */
35
    public function setConsentForPublishing($consent = false)
36
    {
37
        $this->set('//epp:epp/epp:command/epp:extension/extcon:create/extcon:consentForPublishing', $consent ? 1 : 0);
38
    }
39
}
40