| Server IP : 127.0.0.1 / Your IP : 192.168.99.1 Web Server : Apache/2.4.35 (Win64) OpenSSL/1.1.1b mod_fcgid/2.3.9 System : Windows NT WIN-JEJMB9EN0L0 10.0 build 14393 (Windows Server 2016) AMD64 User : Administrator ( 0) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : D:/laragon4/www/wa-gateway/vendor/tomcan/acmeclient/src/Objects/ |
Upload File : |
<?php
namespace TomCan\AcmeClient\Objects;
use TomCan\AcmeClient\Interfaces\OrderInterface;
class Order implements OrderInterface
{
private string $url;
private string $status;
private \DateTime $expires;
/**
* @var mixed[]
*/
private array $identifiers;
/**
* @var string[]
*/
private array $authorizations;
private string $finalize;
/**
* @param mixed[] $identifiers
* @param string[] $authorizations
*/
public function __construct(string $url, string $status, \DateTime $expires, array $identifiers, array $authorizations, string $finalize)
{
$this->url = $url;
$this->status = $status;
$this->expires = $expires;
$this->identifiers = $identifiers;
$this->authorizations = $authorizations;
$this->finalize = $finalize;
}
/**
* @param mixed[] $identifiers
* @param string[] $authorizations
*/
public static function create(string $url, string $status, \DateTime $expires, array $identifiers, array $authorizations, string $finalize): OrderInterface
{
return new Order($url, $status, $expires, $identifiers, $authorizations, $finalize);
}
public function getUrl(): string
{
return $this->url;
}
public function getStatus(): string
{
return $this->status;
}
public function getExpires(): \DateTime
{
return $this->expires;
}
/**
* @return mixed[]
*/
public function getIdentifiers(): array
{
return $this->identifiers;
}
/**
* @return string[]
*/
public function getAuthorizations(): array
{
return $this->authorizations;
}
public function getFinalize(): string
{
return $this->finalize;
}
public function getIdFromUrl(): string
{
return substr($this->url, strrpos($this->url, '/') + 1);
}
}