| Total Complexity | 8 |
| Total Lines | 116 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 5 | class Account extends AbstractEntity |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * The account subdomain. |
||
| 9 | * |
||
| 10 | * @var string |
||
| 11 | */ |
||
| 12 | protected $subdomain; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * The account plan. |
||
| 16 | * |
||
| 17 | * @var string |
||
| 18 | */ |
||
| 19 | protected $plan; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * The account owner's ID. |
||
| 23 | * |
||
| 24 | * @var int |
||
| 25 | */ |
||
| 26 | protected $ownerId; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * The number of people associated with the account. |
||
| 30 | * |
||
| 31 | * @var int |
||
| 32 | */ |
||
| 33 | protected $peopleCount; |
||
| 34 | |||
| 35 | /** |
||
| 36 | * The account storage. |
||
| 37 | * |
||
| 38 | * @var int |
||
| 39 | */ |
||
| 40 | protected $storage; |
||
| 41 | |||
| 42 | /** |
||
| 43 | * The account color theme. |
||
| 44 | * |
||
| 45 | * @var string |
||
| 46 | */ |
||
| 47 | protected $colorTheme; |
||
| 48 | |||
| 49 | /** |
||
| 50 | * Whether or not SSL (TLS) is enabled. |
||
| 51 | * |
||
| 52 | * @var bool |
||
| 53 | */ |
||
| 54 | protected $sslEnabled; |
||
| 55 | |||
| 56 | public function __construct(string $xml) |
||
| 57 | { |
||
| 58 | parent::__construct($xml); |
||
| 59 | $this->subdomain = (string) $this->getXml()->xpath('//subdomain')[0]; |
||
| 60 | $this->plan = (string) $this->getXml()->xpath('//plan')[0]; |
||
| 61 | $this->ownerId = (int) $this->getXml()->xpath('//owner-id')[0]; |
||
| 62 | $this->peopleCount = (int) $this->getXml()->xpath('//people-count')[0]; |
||
| 63 | $this->storage = (int) $this->getXml()->xpath('//storage')[0]; |
||
| 64 | $this->colorTheme = (string) $this->getXml()->xpath('//color_theme')[0]; |
||
| 65 | } |
||
| 66 | |||
| 67 | /** |
||
| 68 | * @return string |
||
| 69 | */ |
||
| 70 | public function getSubdomain(): string |
||
| 71 | { |
||
| 72 | return $this->subdomain; |
||
| 73 | } |
||
| 74 | |||
| 75 | /** |
||
| 76 | * @return string |
||
| 77 | */ |
||
| 78 | public function getPlan(): string |
||
| 79 | { |
||
| 80 | return $this->plan; |
||
| 81 | } |
||
| 82 | |||
| 83 | /** |
||
| 84 | * @return string |
||
| 85 | */ |
||
| 86 | public function getOwnerId(): string |
||
| 87 | { |
||
| 88 | return $this->ownerId; |
||
| 89 | } |
||
| 90 | |||
| 91 | /** |
||
| 92 | * @return int |
||
| 93 | */ |
||
| 94 | public function getPeopleCount(): int |
||
| 95 | { |
||
| 96 | return $this->peopleCount; |
||
| 97 | } |
||
| 98 | |||
| 99 | /** |
||
| 100 | * @return int |
||
| 101 | */ |
||
| 102 | public function getStorage(): int |
||
| 103 | { |
||
| 104 | return $this->storage; |
||
| 105 | } |
||
| 106 | |||
| 107 | /** |
||
| 108 | * @return string |
||
| 109 | */ |
||
| 110 | public function getColorTheme(): string |
||
| 113 | } |
||
| 114 | |||
| 115 | /** |
||
| 116 | * @return bool |
||
| 117 | */ |
||
| 118 | public function isSslEnabled(): bool |
||
| 121 | } |
||
| 122 | } |
||
| 123 |