{$this->handler}('http://typecho.org/version.json'); if (empty($content) || null === ($content = json_decode($content, true)) || empty($content['release']) || empty($content['version']) ) { throw new Exception('Fetch release version failed!'); } $downloadUrl = sprintf('https://github.com/typecho/typecho/archive/v%s-%s-release.zip', $content['release'], $content['version']); } return $this->{$this->handler}($downloadUrl, $archiveRealPath); } }