apps = getContents(self::APPSURI); $this->apps = json_decode($this->apps, true)['applist']; } private function sortApps() { usort($this->apps, function ($app1, $app2) { return $app1['FirstSeen'] < $app2['FirstSeen'] ? 1 : -1; }); } public function collectData() { $this->fetchApps(); $this->sortApps(); foreach ($this->apps as $app) { if (array_key_exists('Language', $app)) { continue; } $item = []; $item['title'] = $app['Name']; $item['timestamp'] = $app['FirstSeen']; $item['author'] = explode('\'', $app['Repo'])[0]; $item['content'] = ''; if (isset($app['CategoryList'])) { $item['categories'] = $app['CategoryList']; } if (array_key_exists('Icon', $app)) { $item['content'] .= ''; } if (array_key_exists('Overview', $app)) { $item['content'] .= '
' . $app['Overview'] . '
'; } if (array_key_exists('Project', $app)) { $item['uri'] = $app['Project']; } if (array_key_exists('Registry', $app)) { $item['content'] .= '