Pionia Core

WrapperClock
in package
implements ClockInterface

FinalYes

Table of Contents

Interfaces

ClockInterface

Properties

$currentClock  : ClockInterface|Factory|DateTimeInterface

Methods

__construct()  : mixed
getFactory()  : Factory
now()  : DateTimeImmutable
nowAs()  : T
nowAsCarbon()  : CarbonInterface
sleep()  : void
unwrap()  : ClockInterface|Factory|DateTimeInterface
withTimeZone()  : static
addSeconds()  : DateTimeInterface
dateAsCarbon()  : CarbonInterface
nowRaw()  : DateTimeInterface

Properties

Methods

__construct()

public __construct(ClockInterface|Factory|DateTimeInterface $currentClock) : mixed
Parameters
$currentClock : ClockInterface|Factory|DateTimeInterface

now()

public now() : DateTimeImmutable
Return values
DateTimeImmutable

nowAs()

public nowAs(T> $class[, DateTimeZone|string|int|null $timezone = null ]) : T
Parameters
$class : T>
$timezone : DateTimeZone|string|int|null = null
Tags
template

T of CarbonInterface

Return values
T

sleep()

public sleep(float|int $seconds) : void
Parameters
$seconds : float|int

withTimeZone()

public withTimeZone(DateTimeZone|string $timezone) : static
Parameters
$timezone : DateTimeZone|string
Return values
static

addSeconds()

private addSeconds(DateTimeInterface $date, float|int $seconds) : DateTimeInterface
Parameters
$date : DateTimeInterface
$seconds : float|int
Return values
DateTimeInterface

dateAsCarbon()

private dateAsCarbon(DateTimeInterface $date, DateTimeZone|string|int|null $timezone) : CarbonInterface
Parameters
$date : DateTimeInterface
$timezone : DateTimeZone|string|int|null
Return values
CarbonInterface

nowRaw()

private nowRaw() : DateTimeInterface
Return values
DateTimeInterface

        
On this page

Search results