summaryrefslogtreecommitdiffstats
path: root/lib/private/helper.php
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2015-04-09 15:19:57 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2015-07-27 14:58:45 +0200
commit6db6689740a5d11dd53b2502d1eea6e9157479df (patch)
tree276787c9cca5355c5faf50de3b76294b97cca559 /lib/private/helper.php
parent4edfadac96fcf267c97371e67e5feccec94b337e (diff)
downloadnextcloud-server-6db6689740a5d11dd53b2502d1eea6e9157479df.tar.gz
nextcloud-server-6db6689740a5d11dd53b2502d1eea6e9157479df.zip
Added mimetype detector
* Copied unit tests from old functions
Diffstat (limited to 'lib/private/helper.php')
-rw-r--r--lib/private/helper.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/private/helper.php b/lib/private/helper.php
index ed954f87630..09f0ba1da3c 100644
--- a/lib/private/helper.php
+++ b/lib/private/helper.php
@@ -183,6 +183,7 @@ class OC_Helper {
* @return string the url
*
* Returns the path to the image of this file type.
+ * @deprecated Use \OC::$server->getMimeTypeDetector()->mimeTypeIcon($mimetype)
*/
public static function mimetypeIcon($mimetype) {
@@ -465,6 +466,7 @@ class OC_Helper {
*
* @param string $path
* @return string
+ * @deprecated Use \OC::$server->getMimeTypeDetector()->detectPath($path)
*/
static public function getFileNameMimeType($path) {
return self::getMimetypeDetector()->detectPath($path);
@@ -476,6 +478,7 @@ class OC_Helper {
* @param string $path
* @return string
* does NOT work for ownClouds filesystem, use OC_FileSystem::getMimeType instead
+ * @deprecated Use \OC::$server->getMimeTypeDetector()->detect($path)
*/
static function getMimeType($path) {
return self::getMimetypeDetector()->detect($path);
@@ -486,6 +489,7 @@ class OC_Helper {
*
* @param string $mimeType
* @return string
+ * @deprecated Use \OC::$server->getMimeTypeDetector()->getSecureMimeType($mimeType)
*/
static function getSecureMimeType($mimeType) {
return self::getMimetypeDetector()->getSecureMimeType($mimeType);
@@ -496,6 +500,7 @@ class OC_Helper {
*
* @param string $data
* @return string
+ * @deprecated Use \OC::$server->getMimeTypeDetector->detectString($data)
*/
static function getStringMimeType($data) {
return self::getMimetypeDetector()->detectString($data);