1 | <?php |
||
13 | class Certificate implements ICertificate { |
||
14 | protected $name; |
||
15 | |||
16 | protected $commonName; |
||
17 | |||
18 | protected $organization; |
||
19 | |||
20 | protected $serial; |
||
21 | |||
22 | protected $issueDate; |
||
23 | |||
24 | protected $expireDate; |
||
25 | |||
26 | protected $issuerName; |
||
27 | |||
28 | protected $issuerOrganization; |
||
29 | |||
30 | /** |
||
31 | * @param string $data base64 encoded certificate |
||
32 | * @param string $name |
||
33 | * @throws \Exception If the certificate could not get parsed |
||
34 | */ |
||
35 | public function __construct($data, $name) { |
||
57 | |||
58 | /** |
||
59 | * @return string |
||
60 | */ |
||
61 | public function getName() { |
||
64 | |||
65 | /** |
||
66 | * @return string|null |
||
67 | */ |
||
68 | public function getCommonName() { |
||
71 | |||
72 | /** |
||
73 | * @return string |
||
74 | */ |
||
75 | public function getOrganization() { |
||
78 | |||
79 | /** |
||
80 | * @return \DateTime |
||
81 | */ |
||
82 | public function getIssueDate() { |
||
85 | |||
86 | /** |
||
87 | * @return \DateTime |
||
88 | */ |
||
89 | public function getExpireDate() { |
||
92 | |||
93 | /** |
||
94 | * @return bool |
||
95 | */ |
||
96 | public function isExpired() { |
||
100 | |||
101 | /** |
||
102 | * @return string|null |
||
103 | */ |
||
104 | public function getIssuerName() { |
||
107 | |||
108 | /** |
||
109 | * @return string|null |
||
110 | */ |
||
111 | public function getIssuerOrganization() { |
||
114 | } |
||
115 |