diff options
Diffstat (limited to 'lib/private/server.php')
-rw-r--r-- | lib/private/server.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/private/server.php b/lib/private/server.php index 53949b53df7..12981fe7f19 100644 --- a/lib/private/server.php +++ b/lib/private/server.php @@ -12,6 +12,7 @@ * @author Morris Jobke <hey@morrisjobke.de> * @author Robin Appelman <icewind@owncloud.com> * @author Robin McCorkell <rmccorkell@karoshi.org.uk> + * @author Roeland Jago Douma <roeland@famdouma.nl> * @author Sander <brantje@gmail.com> * @author Thomas Müller <thomas.mueller@tmit.eu> * @author Thomas Tanghus <thomas@tanghus.net> @@ -443,6 +444,11 @@ class Server extends SimpleContainer implements IServerContainer { $this->registerService('MountManager', function () { return new \OC\Files\Mount\Manager(); }); + $this->registerService('MimeTypeDetector', function(Server $c) { + return new \OC\Files\Type\Detection( + $c->getURLGenerator(), + \OC::$configDir); + }); } /** @@ -930,4 +936,13 @@ class Server extends SimpleContainer implements IServerContainer { function getMountManager() { return $this->query('MountManager'); } + + /* + * Get the MimeTypeDetector + * + * @return \OCP\Files\IMimeTypeDetector + */ + public function getMimeTypeDetector() { + return $this->query('MimeTypeDetector'); + } } |