From 16bfca18712e96e9972946c2e7b633690899738e Mon Sep 17 00:00:00 2001 From: marcus Date: Wed, 5 Nov 2008 18:40:19 +0000 Subject: Minor extension to river git-svn-id: https://code.elgg.org/elgg/trunk@2408 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/river.php | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'engine/lib') diff --git a/engine/lib/river.php b/engine/lib/river.php index e6a6e12dc..0b81e71aa 100644 --- a/engine/lib/river.php +++ b/engine/lib/river.php @@ -39,6 +39,11 @@ */ private $subject; + /** + * When the event occured. + */ + private $timestamp; + /** * Create the statement. * @@ -47,12 +52,14 @@ * @param mixed $object The object, either an ElggEntity or an associated array * ('subject' => ElggEntity, 'relationship' => relationship, 'object' => ElggEntity) or * ('subject' => ElggEntity, 'object' => ElggEntity) + * @param int $timestamp The timestamp */ - public function __construct(ElggUser $subject, $event, $object) + public function __construct(ElggUser $subject, $event, $object, $timestamp) { $this->setSubject($subject); $this->setEvent($event); $this->setObject($object); + $this->setTimestamp($timestamp); } /** @@ -142,6 +149,10 @@ * @return string */ public function getEvent() { return $this->log_event; } + + public function setTimestamp($timestamp) { $this->timestamp = $timestamp; } + + public function getTimestamp() { return $this->timestamp; } } /** @@ -273,7 +284,7 @@ } // Put together a river statement - return new ElggRiverStatement($by_user_obj, $event, $statement_object); + return new ElggRiverStatement($by_user_obj, $event, $statement_object, $log->time_created); } return false; -- cgit v1.2.3