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; } }