summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrojaro <>2010-03-19 13:36:37 +0000
committerrojaro <>2010-03-19 13:36:37 +0000
commit4e87d9537725987ca99544ea0c5435423e876539 (patch)
treeeacdecf9624e1981a057ee76fca3115dd47054ce
parent03d3521fd622769c851c12edea057d6ef9a0c0d9 (diff)
Added missing THttpRuest->getContentType
-rw-r--r--framework/Web/THttpRequest.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/framework/Web/THttpRequest.php b/framework/Web/THttpRequest.php
index c3926d08..34ba3f75 100644
--- a/framework/Web/THttpRequest.php
+++ b/framework/Web/THttpRequest.php
@@ -319,6 +319,14 @@ class THttpRequest extends TApplicationComponent implements IteratorAggregate,Ar
}
/**
+ * @return string content type (e.g. 'application/json') or null if not specified
+ */
+ public function getContentType()
+ {
+ return isset($_SERVER['CONTENT_TYPE']) ? $_SERVER['CONTENT_TYPE'] : null;
+ }
+
+ /**
* @return boolean if the request is sent via secure channel (https)
*/
public function getIsSecureConnection()