Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/files_texteditor.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2017-08-02 23:04:26 +0300
committerRoeland Jago Douma <roeland@famdouma.nl>2017-08-02 23:04:26 +0300
commita9b675e2519ac0507f430e1f538a04209c64001c (patch)
tree9d3b584acca0728072a4a0a32ae3dbad570f1248 /lib
parentcfc5239271006b8357ae379356c8480bbe32657d (diff)
Let DI do the magic
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib')
-rw-r--r--lib/AppInfo/Application.php56
1 files changed, 0 insertions, 56 deletions
diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php
deleted file mode 100644
index 1145e7b..0000000
--- a/lib/AppInfo/Application.php
+++ /dev/null
@@ -1,56 +0,0 @@
-<?php
-/**
- * @author Björn Schießle <schiessle@owncloud.com>
- *
- * @copyright Copyright (c) 2015, ownCloud, Inc.
- * @license AGPL-3.0
- *
- * This code is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * 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, version 3,
- * along with this program. If not, see <http://www.gnu.org/licenses/>
- *
- */
-
-
-namespace OCA\FilesTextEditor\AppInfo;
-
-use OCA\FilesTextEditor\Controller\FileHandlingController;
-use OCP\AppFramework\App;
-use OCP\AppFramework\IAppContainer;
-
-class Application extends App {
-
- /**
- * @param array $urlParams
- */
- public function __construct(array $urlParams = array()) {
- parent::__construct('files_texteditor', $urlParams);
-
- $container = $this->getContainer();
- $server = $container->getServer();
-
- $container->registerService('FileHandlingController', function (IAppContainer $c) use ($server) {
- $user = $server->getUserSession()->getUser();
- if ($user) {
- $uid = $user->getUID();
- } else {
- throw new \BadMethodCallException('no user logged in');
- }
- return new FileHandlingController(
- $c->getAppName(),
- $server->getRequest(),
- $server->getL10N($c->getAppName()),
- $server->getLogger(),
- $server->getUserFolder($uid)
- );
- });
- }
-}