mirror of
https://github.com/anikeen-com/yaac.git
synced 2026-03-13 21:56:10 +00:00
Improved http validation with exponential backoff
Added documentation Simplified HTTP validation flow (no longer need challenge to get file contents) Updated README.md
This commit is contained in:
@@ -41,7 +41,17 @@ class Order
|
||||
*/
|
||||
protected $domains;
|
||||
|
||||
|
||||
/**
|
||||
* Order constructor.
|
||||
* @param array $domains
|
||||
* @param string $url
|
||||
* @param string $status
|
||||
* @param string $expiresAt
|
||||
* @param array $identifiers
|
||||
* @param array $authorizations
|
||||
* @param string $finalizeURL
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function __construct(
|
||||
array $domains,
|
||||
string $url,
|
||||
@@ -51,6 +61,10 @@ class Order
|
||||
array $authorizations,
|
||||
string $finalizeURL
|
||||
) {
|
||||
//Handle the microtime date format
|
||||
if (strpos($expiresAt, '.') !== false) {
|
||||
$expiresAt = substr($expiresAt, 0, strpos($expiresAt, '.')) . 'Z';
|
||||
}
|
||||
$this->domains = $domains;
|
||||
$this->url = $url;
|
||||
$this->status = $status;
|
||||
@@ -60,41 +74,74 @@ class Order
|
||||
$this->finalizeURL = $finalizeURL;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the order number
|
||||
* @return string
|
||||
*/
|
||||
public function getId(): string
|
||||
{
|
||||
return substr($this->url, strrpos($this->url, '/') + 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the order URL
|
||||
* @return string
|
||||
*/
|
||||
public function getURL(): string
|
||||
{
|
||||
return $this->url;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return set of authorizations for the order
|
||||
* @return Authorization[]
|
||||
*/
|
||||
public function getAuthorizationURLs(): array
|
||||
{
|
||||
return $this->authorizations;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns order status
|
||||
* @return string
|
||||
*/
|
||||
public function getStatus(): string
|
||||
{
|
||||
return $this->status;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns expires at
|
||||
* @return \DateTime
|
||||
*/
|
||||
public function getExpiresAt(): \DateTime
|
||||
{
|
||||
return $this->expiresAt;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returs domains as identifiers
|
||||
* @return array
|
||||
*/
|
||||
public function getIdentifiers(): array
|
||||
{
|
||||
return $this->identifiers;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns url
|
||||
* @return string
|
||||
*/
|
||||
public function getFinalizeURL(): string
|
||||
{
|
||||
return $this->finalizeURL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns domains for the order
|
||||
* @return array
|
||||
*/
|
||||
public function getDomains(): array
|
||||
{
|
||||
return $this->domains;
|
||||
|
||||
Reference in New Issue
Block a user