示例#1
0
 public function getComments($args = array())
 {
     $comments = PostDataHelper::getComments($this->properties['id'], $args);
     $this->properties['comments'] = $comments;
     return $comments;
 }
示例#2
0
 public function getByDate($year = null, $monthnum = null, $day = null, $conditions = array())
 {
     $conditions['year'] = !is_null($year) ? $year : date('Y');
     $conditions['monthnum'] = !is_null($monthnum) ? $monthnum : date('m');
     $conditions['day'] = !is_null($day) ? $day : date('d');
     $posts = query_posts($conditions);
     if (is_array($posts)) {
         $result = array();
         foreach ($posts as $post) {
             $result[] = PostDataHelper::createPostObject($this->option['getComments']);
         }
         return $result;
     } else {
         return null;
     }
 }