@@ 12-45 (lines=34) @@ | ||
9 | * Claim Names Section 4.1 or Public Claim Names Section 4.2. Unlike Public Claim Names, Private Claim Names are subject |
|
10 | * to collision and should be used with caution. |
|
11 | */ |
|
12 | class PrivateClaim extends AbstractClaim |
|
13 | { |
|
14 | /** |
|
15 | * @var string |
|
16 | */ |
|
17 | private $name; |
|
18 | ||
19 | /** |
|
20 | * @param string $name |
|
21 | * @param mixed $value |
|
22 | */ |
|
23 | public function __construct($name = null, $value = null) |
|
24 | { |
|
25 | parent::__construct($value); |
|
26 | ||
27 | $this->setName($name); |
|
28 | } |
|
29 | ||
30 | /** |
|
31 | * @return string |
|
32 | */ |
|
33 | public function getName() |
|
34 | { |
|
35 | return $this->name; |
|
36 | } |
|
37 | ||
38 | /** |
|
39 | * @param string $name |
|
40 | */ |
|
41 | public function setName($name) |
|
42 | { |
|
43 | $this->name = $name; |
|
44 | } |
|
45 | } |
|
46 |
@@ 14-47 (lines=34) @@ | ||
11 | * reasonable precautions to make sure they are in control of the part of the namespace they use to define the Claim |
|
12 | * Name. |
|
13 | */ |
|
14 | class PublicClaim extends AbstractClaim |
|
15 | { |
|
16 | /** |
|
17 | * @var string |
|
18 | */ |
|
19 | private $name; |
|
20 | ||
21 | /** |
|
22 | * @param string $name |
|
23 | * @param mixed $value |
|
24 | */ |
|
25 | public function __construct($name = null, $value = null) |
|
26 | { |
|
27 | parent::__construct($value); |
|
28 | ||
29 | $this->setName($name); |
|
30 | } |
|
31 | ||
32 | /** |
|
33 | * @return string |
|
34 | */ |
|
35 | public function getName() |
|
36 | { |
|
37 | return $this->name; |
|
38 | } |
|
39 | ||
40 | /** |
|
41 | * @param string $name |
|
42 | */ |
|
43 | public function setName($name) |
|
44 | { |
|
45 | $this->name = $name; |
|
46 | } |
|
47 | } |
|
48 |