data as $post) {
$item = [];
$item['uri'] = sprintf('https://www.qnap.com%s', $post->url);
$item['title'] = $post->title;
$item['timestamp'] = \DateTime::createFromFormat('Y-m-d', $post->date)->format('U');
$image = sprintf('
', $post->image_url);
$item['content'] = $image . '
' . $post->desc;
$this->items[] = $item;
}
usort($this->items, function ($a, $b) {
return $a['timestamp'] < $b['timestamp'];
});
}
}