| @@ 42-50 (lines=9) @@ | ||
| 39 | /** @var ISimpleFolder */ |
|
| 40 | private $appData; |
|
| 41 | ||
| 42 | public function __construct(IConfig $config, IClientService $clientService, IAppData $appData) { |
|
| 43 | $this->config = $config; |
|
| 44 | $this->clientService = $clientService; |
|
| 45 | try { |
|
| 46 | $this->appData = $appData->getFolder('richdocuments'); |
|
| 47 | } catch (NotFoundException $e) { |
|
| 48 | $this->appData = $appData->newFolder('richdocuments'); |
|
| 49 | } |
|
| 50 | } |
|
| 51 | ||
| 52 | private function getFile() { |
|
| 53 | try { |
|
| @@ 51-64 (lines=14) @@ | ||
| 48 | * @param IL10N $l10n |
|
| 49 | * @param ITimeFactory $timeFactory |
|
| 50 | */ |
|
| 51 | public function __construct(IClientService $clientService, |
|
| 52 | IAppData $appData, |
|
| 53 | IConfig $config, |
|
| 54 | IL10N $l10n, |
|
| 55 | ITimeFactory $timeFactory) { |
|
| 56 | $this->clientService = $clientService; |
|
| 57 | try { |
|
| 58 | $this->appData = $appData->getFolder('richdocuments'); |
|
| 59 | } catch (NotFoundException $e) { |
|
| 60 | $this->appData = $appData->newFolder('richdocuments'); |
|
| 61 | } |
|
| 62 | $this->config = $config; |
|
| 63 | $this->timeFactory = $timeFactory; |
|
| 64 | } |
|
| 65 | ||
| 66 | public function get() { |
|
| 67 | // First check if there is a local valid discovery file |
|