Subversion Repositories oidplus

Rev

Rev 1086 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
979 daniel-mar 1
<?php
2
 
3
/*
4
 * OIDplus 2.0
1086 daniel-mar 5
 * Copyright 2019 - 2023 Daniel Marschall, ViaThinkSoft
979 daniel-mar 6
 *
7
 * Licensed under the Apache License, Version 2.0 (the "License");
8
 * you may not use this file except in compliance with the License.
9
 * You may obtain a copy of the License at
10
 *
11
 *     http://www.apache.org/licenses/LICENSE-2.0
12
 *
13
 * Unless required by applicable law or agreed to in writing, software
14
 * distributed under the License is distributed on an "AS IS" BASIS,
15
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
 * See the License for the specific language governing permissions and
17
 * limitations under the License.
18
 */
19
 
1050 daniel-mar 20
namespace ViaThinkSoft\OIDplus;
979 daniel-mar 21
 
1086 daniel-mar 22
// phpcs:disable PSR1.Files.SideEffects
23
\defined('INSIDE_OIDPLUS') or die;
24
// phpcs:enable PSR1.Files.SideEffects
25
 
979 daniel-mar 26
class OIDplusOidAsn1Id {
1116 daniel-mar 27
        /**
28
         * @var string
29
         */
979 daniel-mar 30
        private $name = '';
1116 daniel-mar 31
 
32
        /**
33
         * @var bool
34
         */
979 daniel-mar 35
        private $standardized = false;
1116 daniel-mar 36
 
37
        /**
38
         * @var bool
39
         */
979 daniel-mar 40
        private $well_known = false;
1116 daniel-mar 41
 
42
        /**
43
         * @param string $name
44
         * @param bool $standardized
45
         * @param bool $well_known
46
         */
47
        function __construct(string $name, bool $standardized, bool $well_known) {
979 daniel-mar 48
                $this->name = $name;
49
                $this->standardized = $standardized;
50
                $this->well_known = $well_known;
51
        }
1116 daniel-mar 52
 
53
        /**
54
         * @return string
55
         */
56
        function getName(): string {
979 daniel-mar 57
                return $this->name;
58
        }
1116 daniel-mar 59
 
60
        /**
61
         * @return bool
62
         */
63
        function isStandardized(): bool {
979 daniel-mar 64
                return $this->standardized;
65
        }
1116 daniel-mar 66
 
67
        /**
68
         * @return bool
69
         */
70
        function isWellKnown(): bool {
979 daniel-mar 71
                return $this->well_known;
72
        }
1116 daniel-mar 73
 
74
        /**
75
         * @return string
76
         */
77
        function __toString(): string {
979 daniel-mar 78
                return $this->name;
79
        }
80
}