/** * @todo: docs */ private function comment_to_ocs(com_meego_package_ratings $rating, com_meego_ocs_OCSWriter $ocs) { $ocs->startElement('comment'); $ocs->writeElement('id', $rating->commentid); $ocs->writeElement('subject', $rating->version . ':' . $rating->title); $ocs->writeElement('text', $rating->comment); // todo: no support of subcomments yet $userid = ''; $user = com_meego_packages_utils::get_user_by_person_guid($rating->authorguid); if ($user) { $userid = $user->login; } $ocs->writeElement('user', $userid); $ocs->writeElement('date', $rating->posted->format('c')); $ocs->writeElement('score', $rating->rating); $ocs->endElement(); }