PHP Trait Elgg\TimeUsing

Afficher le fichier Open project: elgg/elgg

Méthodes publiques

Méthode Description
getCurrentTime ( string $modifier = '' ) : DateTime Get the (cloned) time. If setCurrentTime() has not been set, this will return a new DateTime().
setCurrentTime ( DateTime $time = null ) : void Set the current time.

Method Details

getCurrentTime() public méthode

Get the (cloned) time. If setCurrentTime() has not been set, this will return a new DateTime().
See also: DateTime::modify
public getCurrentTime ( string $modifier = '' ) : DateTime
$modifier string Time modifier
Résultat DateTime

setCurrentTime() public méthode

Set the current time.
public setCurrentTime ( DateTime $time = null ) : void
$time DateTime Current time (empty for now)
Résultat void