diff --git a/lib/Alchemy/Phrasea/Media/MediaTypeFactory.php b/lib/Alchemy/Phrasea/Media/MediaTypeFactory.php index 33a351ce5f..2bc93f907f 100644 --- a/lib/Alchemy/Phrasea/Media/MediaTypeFactory.php +++ b/lib/Alchemy/Phrasea/Media/MediaTypeFactory.php @@ -30,6 +30,8 @@ class MediaTypeFactory return new Type\Document(); case Type\Type::TYPE_FLASH: return new Type\Flash(); + case Type\Type::TYPE_UNKNOWN: + return new Type\Unknown(); } throw new \RuntimeException('Could not create requested media type'); diff --git a/lib/Alchemy/Phrasea/Media/Type/Type.php b/lib/Alchemy/Phrasea/Media/Type/Type.php index 6febd03a9c..731ced8149 100644 --- a/lib/Alchemy/Phrasea/Media/Type/Type.php +++ b/lib/Alchemy/Phrasea/Media/Type/Type.php @@ -18,6 +18,7 @@ interface Type const TYPE_DOCUMENT = 'document'; const TYPE_FLASH = 'flash'; const TYPE_IMAGE = 'image'; + const TYPE_UNKNOWN = 'unknown'; public function getType(); } diff --git a/lib/Alchemy/Phrasea/Media/Type/Unknown.php b/lib/Alchemy/Phrasea/Media/Type/Unknown.php new file mode 100644 index 0000000000..1b22583be9 --- /dev/null +++ b/lib/Alchemy/Phrasea/Media/Type/Unknown.php @@ -0,0 +1,21 @@ +