Completed
Push — master ( 1cea30...381bb7 )
by Thijs
08:24
created

NameIDType::setSPProvidedID()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 1
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace SAML2;
4
5
/**
6
 * Base class for NameIDType element.
7
 */
8
abstract class NameIDType extends BaseID
9
{
10
    /**
11
     * A URI reference representing the classification of string-based identifier information.
12
     *
13
     * @var string|null
14
     */
15
    private $format;
16
17
    /**
18
     * A A name identifier established by a service provider or affiliation of providers for the entity.
19
     *
20
     * @var string|null
21
     */
22
    private $spProvidedID;
23
24
    /**
25
     * Retrieve the name identifier established by a service provider or affiliation of providers for the entity.
26
     *
27
     * @return string name identifier established by a service provider or affiliation of providers for the entity
28
     */
29
    public function getSPProvidedID()
30
    {
31
        return $this->spProvidedID;
32
    }
33
34
    /**
35
     * Set the name identifier established by a service provider or affiliation of providers for the entity.
36
     *
37
     * @param string $spProvidedID name identifier established by a service provider or affiliation of providers for the entity
38
     */
39
    public function setSPProvidedID($spProvidedID)
40
    {
41
        assert('is_string($spProvidedID) || is_null($spProvidedID)');
42
43
        $this->spProvidedID = $spProvidedID;
44
    }
45
46
    /**
47
     * Retrieve the format.
48
     *
49
     * @return string format
50
     */
51
    public function getFormat()
52
    {
53
        return $this->format;
54
    }
55
56
    /**
57
     * Set the format.
58
     *
59
     * @param string $format format for the entity
60
     */
61
    public function setFormat($format)
62
    {
63
        assert('is_string($format) || is_null($format)');
64
65
        $this->format = $format;
66
    }
67
}
68