mirror of
https://github.com/php-flasher/php-flasher.git
synced 2026-03-31 15:07:47 +01:00
30 lines
561 B
PHP
30 lines
561 B
PHP
<?php
|
|
|
|
namespace Flasher\Prime\TestsStamp;
|
|
|
|
final class RenderedAtStamp implements StampInterface
|
|
{
|
|
/**
|
|
* @param \DateTime
|
|
*/
|
|
private $renderedAt;
|
|
|
|
/**
|
|
* @param \DateTime|null $renderedAt
|
|
*
|
|
* @throws \Exception
|
|
*/
|
|
public function __construct(\DateTime $renderedAt = null)
|
|
{
|
|
$this->renderedAt = $renderedAt ?: new \DateTime('now', new \DateTimeZone('Africa/Casablanca'));
|
|
}
|
|
|
|
/**
|
|
* @return \DateTime
|
|
*/
|
|
public function getRenderedAt()
|
|
{
|
|
return $this->renderedAt;
|
|
}
|
|
}
|