Commit 204a6a79 authored by Franz Liedke's avatar Franz Liedke

Add a Request::time() function.

parent ebcbbbb8
......@@ -177,6 +177,25 @@ class Request {
{
return static::foundation()->headers->get('referer');
}
/**
* Get the timestamp of the time when the request was started.
*
* The value is actually calculated when this function gets first called.
*
* @return int
*/
public static function time()
{
static $time;
if (!isset($time))
{
$time = time();
}
return $time;
}
/**
* Determine if the current request is via the command line.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment