示例#1
0
 function TPCommentListing($entry_xid)
 {
     $tp_comments = array();
     $events = pull_json(get_comments_api_url($entry_xid));
     $i = 0;
     $param = array();
     foreach ($events->{'entries'} as $comment) {
         $param['xid'] = $comment->urlId;
         $param['json'] = $comment;
         $this->tp_comments[$i] = new Comment("TypePad", $param);
         $i++;
     }
 }
示例#2
0
 function TPCommentListing($params)
 {
     if (!array_key_exists('xid', $params)) {
         debug("[TPCommentListing::TPCommentListing] Expected parameter 'xid' in the constructor.");
         return;
     }
     $this->post_xid = $params['xid'];
     $this->comment_listing = array();
     $events = pull_json(get_comments_api_url($params['xid']));
     $i = 0;
     foreach ($events->{'entries'} as $comment) {
         $this->comment_array[$i] = new Comment(array('xid' => $comment->urlId, 'json' => $comment));
         $i++;
     }
 }