AppTime.php
395 Bytes
<?php
namespace FootyRoom\Support;
class AppTime
{
protected static $timestamp = NULL;
public static function now()
{
return self::$timestamp !== NULL ? self::$timestamp : time();
}
public static function setTime(int $timestamp)
{
self::$timestamp = $timestamp;
}
public static function reset()
{
self::$timestamp = NULL;
}
}