From d25ab02ef34c5e20deb278e4379a6a3a365a93a0 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Thu, 24 Oct 2013 12:07:26 +0200 Subject: [PATCH] [ticket/11912] Introduce guesser_interface This will contain proper documentation of the required methods if anyone would implement a newer guesser. PHPBB3-11912 --- phpBB/phpbb/mimetype/content_guesser.php | 8 ++--- phpBB/phpbb/mimetype/guesser_interface.php | 41 ++++++++++++++++++++++ 2 files changed, 43 insertions(+), 6 deletions(-) create mode 100644 phpBB/phpbb/mimetype/guesser_interface.php 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 @@ +