Also allow to specify the cache file name

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2018-02-28 11:31:33 +01:00
parent 533e8351ad
commit 029e8cdc5b
No known key found for this signature in database
GPG Key ID: 7076EA9751AACDDA
2 changed files with 4 additions and 2 deletions

View File

@ -133,9 +133,11 @@ class AppFetcher extends Fetcher {
/**
* @param string $version
* @param string $filename
*/
public function setVersion($version) {
public function setVersion(string $version, string $fileName = 'apps.json') {
parent::setVersion($version);
$this->fileName = $fileName;
$this->setEndpoint();
}
}

View File

@ -194,7 +194,7 @@ abstract class Fetcher {
* Set the current Nextcloud version
* @param string $version
*/
public function setVersion($version) {
public function setVersion(string $version) {
$this->version = $version;
}
}