blob: 1ec239cbebdab3c6ca372ac591436600e895439d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
<?php
namespace BjoernrDe\SSLLabsApi\Objects;
class Chain implements ApiObject
{
private $chain = array();
private $issues;
public function getChain()
{
return ($this->chain);
}
private function setChain($chain)
{
$this->chain = $chain;
}
public function getIssues()
{
return ($this->issues);
}
private function setIssues($issues)
{
$this->issues = $issues;
}
/**
* {@inheritDoc}
*
* @return \SSLLabsApi\Objects\Cert
* @see \SSLLabsApi\Objects\ApiObject::populateObjectByApiResponse()
*/
public function populateObjectByApiResponse($jsonString)
{
$response = json_decode($jsonString);
isset($response->subject) ? $this->setSubject($response->subject) : '';
isset($response->commonNames) ? $this->setCommonNames($response->commonNames) : '';
isset($response->altNames) ? $this->setAltNames($response->altNames) : '';
isset($response->notBefore) ? $this->setNotBefore($response->notBefore) : '';
isset($response->notAfter) ? $this->setNotAfter($response->notAfter) : '';
isset($response->issuerSubject) ? $this->setIssuerSubject($response->issuerSubject) : '';
isset($response->issuerLabel) ? $this->setIssuerLabel($response->issuerLabel) : '';
isset($response->sigAlg) ? $this->setSigAlg($response->sigAlg) : '';
isset($response->revocationInfo) ? $this->setRevocationInfo($response->revocationInfo) : '';
isset($response->crlURIs) ? $this->setCrlURIs($response->crlURIs) : '';
isset($response->ocspURIs) ? $this->setOcspURIs($response->ocspURIs) : '';
isset($response->revocationStatus) ? $this->setRevocationStatus($response->revocationStatus) : '';
isset($response->crlRevocationStatus) ? $this->setCrlRevocationStatus($response->crlRevocationStatus) : '';
isset($response->ocspRevocationStatus) ? $this->setOcspRevocationStatus($response->ocspRevocationStatus) : '';
isset($response->sgc) ? $this->setSgc($response->sgc) : '';
isset($response->issues) ? $this->setIssues($response->issues) : '';
isset($response->sct) ? $this->setSct($response->sct) : '';
isset($response->sha1Hash) ? $this->setSha1Hash($response->sha1Hash) : '';
isset($response->pinSha256) ? $this->setPinSha256($response->pinSha256) : '';
return ($this);
}
}
|