Permalink
Browse files

MINOR Adding phpdoc to HTTP::get_mime_type()

  • Loading branch information...
1 parent 1e6a526 commit 1616bae73094bbb6b4bd44330793d00b4a5c2380 @halkyon halkyon committed May 11, 2012
Showing with 6 additions and 4 deletions.
  1. +6 −4 control/HTTP.php
View
@@ -183,7 +183,7 @@ static function getImagesIn($content) {
/**
* Get mime type based on extension
- *
+ *
* @uses finfo
* @deprecated Use HTTP::get_mime_type() instead
*/
@@ -193,13 +193,15 @@ public static function getMimeType($filename) {
}
/**
- * Get mime type based on extension
- *
+ * Get mime type based on file extension.
+ *
* @uses finfo
+ * @param string $filename Relative path to filename from project root, e.g. "mysite/tests/file.csv"
+ * @return string MIME type
*/
public static function get_mime_type($filename) {
$finfo = new finfo(FILEINFO_MIME_TYPE);
- return $finfo->file(BASE_PATH.DIRECTORY_SEPARATOR.$filename);
+ return $finfo->file(BASE_PATH . DIRECTORY_SEPARATOR . $filename);
}
/**

0 comments on commit 1616bae

Please sign in to comment.