2022-08-15 21:22:01 +00:00
|
|
|
<?php
|
|
|
|
|
|
2024-03-30 16:44:38 +01:00
|
|
|
namespace Hosterra\FluxBuilder\Type;
|
2022-08-15 21:22:01 +00:00
|
|
|
|
|
|
|
|
use DateTime;
|
|
|
|
|
|
2024-03-30 16:44:38 +01:00
|
|
|
class TimeType implements TypeInterface {
|
|
|
|
|
public function __construct( DateTime $dateTime ) {
|
|
|
|
|
$this->dateTime = $dateTime;
|
|
|
|
|
}
|
2022-08-15 21:22:01 +00:00
|
|
|
|
2024-03-30 16:44:38 +01:00
|
|
|
public function __toString(): string {
|
|
|
|
|
return 'time(v: ' . $this->dateTime->format( 'Y-m-d\TH:i:s\Z' ) . ')';
|
|
|
|
|
}
|
2022-08-15 21:22:01 +00:00
|
|
|
}
|