diff options
Diffstat (limited to 'engine/classes/ElggRiverItem.php')
| -rw-r--r-- | engine/classes/ElggRiverItem.php | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/engine/classes/ElggRiverItem.php b/engine/classes/ElggRiverItem.php index cdb22239d..d3d09cd91 100644 --- a/engine/classes/ElggRiverItem.php +++ b/engine/classes/ElggRiverItem.php @@ -4,9 +4,19 @@ * * @package Elgg.Core * @subpackage Core + * + * @property int $id The unique identifier (read-only) + * @property int $subject_guid The GUID of the actor + * @property int $object_guid The GUID of the object + * @property int $annotation_id The ID of the annotation involved in the action + * @property string $type The type of one of the entities involved in the action + * @property string $subtype The subtype of one of the entities involved in the action + * @property string $action_type The name of the action + * @property string $view The view for displaying this river item + * @property int $access_id The visibility of the river item + * @property int $posted UNIX timestamp when the action occurred */ -class ElggRiverItem -{ +class ElggRiverItem { public $id; public $subject_guid; public $object_guid; @@ -28,8 +38,14 @@ class ElggRiverItem // throw exception } + // the casting is to support typed serialization like json + $int_types = array('id', 'subject_guid', 'object_guid', 'annotation_id', 'access_id', 'posted'); foreach ($object as $key => $value) { - $this->$key = $value; + if (in_array($key, $int_types)) { + $this->$key = (int)$value; + } else { + $this->$key = $value; + } } } |
