Rev 1086 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1086 | Rev 1116 | ||
---|---|---|---|
Line 22... | Line 22... | ||
22 | // phpcs:disable PSR1.Files.SideEffects |
22 | // phpcs:disable PSR1.Files.SideEffects |
23 | \defined('INSIDE_OIDPLUS') or die; |
23 | \defined('INSIDE_OIDPLUS') or die; |
24 | // phpcs:enable PSR1.Files.SideEffects |
24 | // phpcs:enable PSR1.Files.SideEffects |
25 | 25 | ||
26 | class OIDplusOidAsn1Id { |
26 | class OIDplusOidAsn1Id { |
- | 27 | /** |
|
- | 28 | * @var string |
|
- | 29 | */ |
|
27 | private $name = ''; |
30 | private $name = ''; |
- | 31 | ||
- | 32 | /** |
|
- | 33 | * @var bool |
|
- | 34 | */ |
|
28 | private $standardized = false; |
35 | private $standardized = false; |
- | 36 | ||
- | 37 | /** |
|
- | 38 | * @var bool |
|
- | 39 | */ |
|
29 | private $well_known = false; |
40 | private $well_known = false; |
- | 41 | ||
- | 42 | /** |
|
- | 43 | * @param string $name |
|
- | 44 | * @param bool $standardized |
|
- | 45 | * @param bool $well_known |
|
- | 46 | */ |
|
30 | function __construct($name, $standardized, $well_known) { |
47 | function __construct(string $name, bool $standardized, bool $well_known) { |
31 | $this->name = $name; |
48 | $this->name = $name; |
32 | $this->standardized = $standardized; |
49 | $this->standardized = $standardized; |
33 | $this->well_known = $well_known; |
50 | $this->well_known = $well_known; |
34 | } |
51 | } |
- | 52 | ||
- | 53 | /** |
|
- | 54 | * @return string |
|
- | 55 | */ |
|
35 | function getName() { |
56 | function getName(): string { |
36 | return $this->name; |
57 | return $this->name; |
37 | } |
58 | } |
- | 59 | ||
- | 60 | /** |
|
- | 61 | * @return bool |
|
- | 62 | */ |
|
38 | function isStandardized() { |
63 | function isStandardized(): bool { |
39 | return $this->standardized; |
64 | return $this->standardized; |
40 | } |
65 | } |
- | 66 | ||
- | 67 | /** |
|
- | 68 | * @return bool |
|
- | 69 | */ |
|
41 | function isWellKnown() { |
70 | function isWellKnown(): bool { |
42 | return $this->well_known; |
71 | return $this->well_known; |
43 | } |
72 | } |
- | 73 | ||
- | 74 | /** |
|
- | 75 | * @return string |
|
- | 76 | */ |
|
44 | function __toString() { |
77 | function __toString(): string { |
45 | return $this->name; |
78 | return $this->name; |
46 | } |
79 | } |
47 | } |
80 | } |