mirror of
https://github.com/anikeen-com/yaac.git
synced 2026-03-14 14:16:24 +00:00
Initial commit
This commit is contained in:
87
src/Data/Account.php
Normal file
87
src/Data/Account.php
Normal file
@@ -0,0 +1,87 @@
|
||||
<?php
|
||||
|
||||
namespace Afosto\LetsEncrypt\Data;
|
||||
|
||||
class Account
|
||||
{
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $contact;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $createdAt;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
protected $isValid;
|
||||
|
||||
/**
|
||||
* @var
|
||||
*/
|
||||
protected $initialIp;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $accountURL;
|
||||
|
||||
|
||||
public function __construct(
|
||||
array $contact,
|
||||
\DateTime $createdAt,
|
||||
bool $isValid,
|
||||
string $initialIp,
|
||||
string $accountURL
|
||||
) {
|
||||
$this->initialIp = $initialIp;
|
||||
$this->contact = $contact;
|
||||
$this->createdAt = $createdAt;
|
||||
$this->isValid = $isValid;
|
||||
$this->accountURL = $accountURL;
|
||||
}
|
||||
|
||||
public function getId(): string
|
||||
{
|
||||
return substr($this->accountURL, strrpos($this->accountURL, '/') + 1);
|
||||
}
|
||||
|
||||
public function getCreatedAt(): \DateTime
|
||||
{
|
||||
return $this->createdAt;
|
||||
}
|
||||
|
||||
|
||||
public function getAccountURL(): string
|
||||
{
|
||||
return $this->accountURL;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function getContact(): array
|
||||
{
|
||||
return $this->contact;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getInitialIp(): string
|
||||
{
|
||||
return $this->initialIp;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function isValid(): bool
|
||||
{
|
||||
return $this->isValid;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user