diff options
Diffstat (limited to 'phpBB/phpbb')
-rw-r--r-- | phpBB/phpbb/mimetype/content_guesser.php | 8 | ||||
-rw-r--r-- | phpBB/phpbb/mimetype/guesser_interface.php | 41 |
2 files changed, 43 insertions, 6 deletions
diff --git a/phpBB/phpbb/mimetype/content_guesser.php b/phpBB/phpbb/mimetype/content_guesser.php index 6326bf73fa..f5be9cd44b 100644 --- a/phpBB/phpbb/mimetype/content_guesser.php +++ b/phpBB/phpbb/mimetype/content_guesser.php @@ -21,7 +21,7 @@ if (!defined('IN_PHPBB')) * @package mimetype */ -class content_guesser +class content_guesser implements guesser_interface { /** * @var file extension map @@ -486,11 +486,7 @@ class content_guesser } /** - * Guess mimetype of supplied file - * - * @param string $file Path to file - * - * @return string Guess for mimetype of file + * @inheritdoc */ public function guess($file, $file_name = '') { diff --git a/phpBB/phpbb/mimetype/guesser_interface.php b/phpBB/phpbb/mimetype/guesser_interface.php new file mode 100644 index 0000000000..a9b238d7aa --- /dev/null +++ b/phpBB/phpbb/mimetype/guesser_interface.php @@ -0,0 +1,41 @@ +<?php +/** +* +* @package phpBB3 +* @copyright (c) 2013 phpBB Group +* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 +* +*/ + +namespace phpbb\mimetype; + +/** +* @ignore +*/ +if (!defined('IN_PHPBB')) +{ + exit; +} + +/** +* @package mimetype +*/ + +interface guesser_interface +{ + /** + * Returns whether this guesser is supported on the current OS + * + * @return bool True if guesser is supported, false if not + */ + public function is_supported(); + + /** + * Guess mimetype of supplied file + * + * @param string $file Path to file + * + * @return string Guess for mimetype of file + */ + public function guess($file, $file_name = ''); +} |