From 4e87d9537725987ca99544ea0c5435423e876539 Mon Sep 17 00:00:00 2001 From: rojaro <> Date: Fri, 19 Mar 2010 13:36:37 +0000 Subject: Added missing THttpRuest->getContentType --- framework/Web/THttpRequest.php | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'framework') 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 @@ -318,6 +318,14 @@ class THttpRequest extends TApplicationComponent implements IteratorAggregate,Ar return $_SERVER['REQUEST_METHOD']; } + /** + * @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) */ -- cgit v1.2.3