diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2016-10-06 09:25:15 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-06 09:25:15 +0200 |
commit | ea9b1cc3409f39c545505bbcddb7a20fda114c0e (patch) | |
tree | fb23c0f7cca1f82daa5519015e57e244b9913d26 /lib/private/Files/AppData/Factory.php | |
parent | ff3e8c21397c79ac1231c4f16a8372908d79b067 (diff) | |
parent | 316db0a97b0212aca2f36b4ee09675bf9809f4dd (diff) | |
download | nextcloud-server-ea9b1cc3409f39c545505bbcddb7a20fda114c0e.tar.gz nextcloud-server-ea9b1cc3409f39c545505bbcddb7a20fda114c0e.zip |
Merge pull request #1306 from nextcloud/simplefs
Introducing AppData
Diffstat (limited to 'lib/private/Files/AppData/Factory.php')
-rw-r--r-- | lib/private/Files/AppData/Factory.php | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/lib/private/Files/AppData/Factory.php b/lib/private/Files/AppData/Factory.php new file mode 100644 index 00000000000..85c75733796 --- /dev/null +++ b/lib/private/Files/AppData/Factory.php @@ -0,0 +1,50 @@ +<?php +/** + * @copyright 2016 Roeland Jago Douma <roeland@famdouma.nl> + * + * @author Roeland Jago Douma <roeland@famdouma.nl> + * + * @license GNU AGPL version 3 or any later version + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ +namespace OC\Files\AppData; + +use OC\SystemConfig; +use OCP\Files\IRootFolder; + +class Factory { + + /** @var IRootFolder */ + private $rootFolder; + + /** @var SystemConfig */ + private $config; + + public function __construct(IRootFolder $rootFolder, + SystemConfig $systemConfig) { + + $this->rootFolder = $rootFolder; + $this->config = $systemConfig; + } + + /** + * @param string $appId + * @return AppData + */ + public function get($appId) { + return new AppData($this->rootFolder, $this->config, $appId); + } +} |