diff options
author | rojaro <> | 2010-03-19 13:36:37 +0000 |
---|---|---|
committer | rojaro <> | 2010-03-19 13:36:37 +0000 |
commit | 4e87d9537725987ca99544ea0c5435423e876539 (patch) | |
tree | eacdecf9624e1981a057ee76fca3115dd47054ce | |
parent | 03d3521fd622769c851c12edea057d6ef9a0c0d9 (diff) |
Added missing THttpRuest->getContentType
-rw-r--r-- | framework/Web/THttpRequest.php | 8 |
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() |