12 private ?\DateTimeImmutable
$time =
null;
23 $time = $this->time ?? new \DateTimeImmutable();
39 if (
$time instanceof \DateTimeInterface) {
40 $this->time = \DateTimeImmutable::createFromInterface(
$time);
42 $this->time = new \DateTimeImmutable();
setCurrentTime(?\DateTimeInterface $time=null)
Set the current time.
resetCurrentTime()
Reset the current time Use after the time has been set with setCurrentTime and it no longer needs to ...
trait TimeUsing
Adds methods for setting the current time (for testing)
getCurrentTime(string $modifier='')
Get the time.
if(! $annotation instanceof ElggAnnotation) $time
if(parse_url(elgg_get_site_url(), PHP_URL_PATH) !=='/') if(file_exists(elgg_get_root_path() . 'robots.txt'))
Set robots.txt.