|
Elgg
Version master
|
Go to the source code of this file.
Functions | |
| Elgg\Traits::getCurrentTime (string $modifier='') | |
| Get the time. More... | |
| Elgg\Traits::setCurrentTime (?\DateTimeInterface $time=null) | |
| Set the current time. More... | |
| Elgg\Traits::resetCurrentTime () | |
| Reset the current time Use after the time has been set with setCurrentTime and it no longer needs to be locked. More... | |
Variables | |
| trait | Elgg\Traits::TimeUsing |
| Adds methods for setting the current time (for testing) More... | |
| Elgg\Traits\getCurrentTime | ( | string | $modifier = '' | ) |
Get the time.
If setCurrentTime() has not been set, this will return a new DateTimeImmutable().
| string | $modifier | Time modifier |
Definition at line 22 of file TimeUsing.php.
| Elgg\Traits\resetCurrentTime | ( | ) |
Reset the current time Use after the time has been set with setCurrentTime and it no longer needs to be locked.
Definition at line 53 of file TimeUsing.php.
| Elgg\Traits\setCurrentTime | ( | ?\DateTimeInterface | $time = null | ) |
Set the current time.
| null | \DateTimeInterface | $time | Current time (empty for now) |
Definition at line 38 of file TimeUsing.php.
| trait Elgg::Traits\TimeUsing |
Adds methods for setting the current time (for testing)
Definition at line 10 of file TimeUsing.php.