summaryrefslogtreecommitdiffstats
path: root/src/Objects/Key.php
blob: c57a613d702c427d951556383737dadf2525d0f2 (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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<?php
namespace BjoernrDe\SSLLabsApi\Objects;

class Key implements ApiObject
{
	private $size;
	private $strength;
	private $alg;
	private $debianFlaw;
	private $q;
	
	public function getSize()
	{
		return ($this->size);
	}
	
	private function setSize($size)
	{
		$this->size = $size;
	}
	
	public function getStrength()
	{
		return ($this->strength);
	}
	
	private function setStrength($strength)
	{
		$this->strength = $strength;
	}
	
	public function getAlg()
	{
		return ($this->alg);
	}
	
	private function setAlg($alg)
	{
		$this->alg = $alg;
	}
	
	public function getDebianFlaw()
	{
		return ($this->debianFlaw);
	}
	
	private function setDebianFlaw($debianFlaw)
	{
		$this->debianFlaw = $debianFlaw;
	}
	
	public function getQ()
	{
		return ($this->q);
	}
	
	private function setQ($q)
	{
		$this->q = $q;
	}
	
	/**
	 * {@inheritDoc}
	 *
	 * @return \BjoernrDe\SSLLabsApi\Objects\Key
	 * @see \BjoernrDe\SSLLabsApi\Objects\ApiObject::populateObjectByApiResponse()
	 */
	public function populateObjectByApiResponse($jsonString)
	{
		$response = json_decode($jsonString);
	
		isset($response->size) ? $this->setSize($response->size) : '';
		isset($response->alg) ? $this->setAlg($response->alg) : '';
		isset($response->debianFlaw) ? $this->setDebianFlaw($response->debianFlaw) : '';
		isset($response->strength) ? $this->setStrength($response->strength) : '';
		isset($response->q) ? $this->setQ($response->q) : '';
		
		return ($this);
	}
}