/** * transform comments array */ public function fixData($data) { $post_comments_fixed = array(); foreach ($data as $post_comment) { $post_comment['comment_created_on'] = Application_Plugin_Common::getTimeElapsedString(strtotime($post_comment['comment_created_on'])); $post_comments_fixed[$post_comment['comment_resource_id']][] = $post_comment; } return $post_comments_fixed; }
public function GetTimeElapsedString($resource) { return Application_Plugin_Common::getTimeElapsedString(strtotime($resource)); }