Elgg
Version 2.3
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
engine
classes
Elgg
TimeUsing.php
Go to the documentation of this file.
1
<?php
2
namespace
Elgg
;
3
4
use
DateTime
;
5
11
trait
TimeUsing
{
12
16
private
$time;
17
26
public
function
getCurrentTime
($modifier =
''
) {
27
$time = $this->
time
? $this->
time
:
new
DateTime
();
28
$time = clone $time;
29
if
($modifier) {
30
$time->modify($modifier);
31
}
32
return
$time;
33
}
34
41
public
function
setCurrentTime
(
DateTime
$time = null) {
42
if
(!$time) {
43
$time =
new
DateTime
();
44
}
45
$this->
time
= clone $time;
46
}
47
}
DateTime
Elgg\getCurrentTime
getCurrentTime($modifier= '')
Get the (cloned) time.
Definition:
TimeUsing.php:26
Elgg
Save menu items.
TimeUsing
time
elgg subtext time
Definition:
typography.css.php:121
use
http free of to any person obtaining a copy of this software and associated documentation to deal in the Software without including without limitation the rights to use
Definition:
MIT-LICENSE.txt:5
Elgg\setCurrentTime
setCurrentTime(DateTime $time=null)
Set the current time.
Definition:
TimeUsing.php:41
Generated on Sat Dec 21 2024 00:01:04 for Elgg by
1.8.11