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

github.com/nextcloud/richdocuments.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/filter.php')
-rw-r--r--lib/filter.php74
1 files changed, 0 insertions, 74 deletions
diff --git a/lib/filter.php b/lib/filter.php
deleted file mode 100644
index 9b5a93f1..00000000
--- a/lib/filter.php
+++ /dev/null
@@ -1,74 +0,0 @@
-<?php
-
-/**
- * ownCloud - Richdocuments App
- *
- * @author Victor Dubiniuk
- * @copyright 2013 Victor Dubiniuk victor.dubiniuk@gmail.com
- *
- * This file is licensed under the Affero General Public License version 3 or
- * later.
- */
-
-namespace OCA\Richdocuments;
-
- class Filter {
- protected static $filters = array();
-
- public static function add($mimetype, $class){
- self::$filters[$mimetype] = $class;
- }
-
- public static function read($content, $mimetype){
- $data = array(
- 'mimetype' => $mimetype,
- 'content' => $content
- );
-
- if (isset(self::$filters[$mimetype])){
- $data = call_user_func(
- array(
- self::$filters[$mimetype],
- 'read'
- ),
- $data
- );
- }
-
- return $data;
- }
-
- public static function write($content, $mimetype){
- $data = array(
- 'mimetype' => $mimetype,
- 'content' => $content
- );
-
- if (isset(self::$filters[$mimetype])){
- $data = call_user_func(
- array(
- self::$filters[$mimetype],
- 'write'
- ),
- $data
- );
- }
-
- return $data;
- }
-
- public static function getAll(){
- return array_keys(self::$filters);
- }
-
- /**
- * Checks if mimetype is supported by the app
- * @param string $mimetype - checked mimetype
- * @return bool
- */
- public static function isSupportedMimetype($mimetype){
- return in_array($mimetype, Storage::getSupportedMimetypes());
- }
-}
-
- \ No newline at end of file