From 53eda19fa2efed997405075ad003aa7a94d31563 Mon Sep 17 00:00:00 2001 From: rojaro <> Date: Fri, 21 Jan 2011 12:39:42 +0000 Subject: fixed #304 --- framework/Web/THttpRequest.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'framework/Web/THttpRequest.php') diff --git a/framework/Web/THttpRequest.php b/framework/Web/THttpRequest.php index fbceef38..925160c8 100644 --- a/framework/Web/THttpRequest.php +++ b/framework/Web/THttpRequest.php @@ -958,6 +958,10 @@ class THttpCookie extends TComponent * @var boolean whether cookie should be sent via secure connection */ private $_secure=false; + /** + * @var boolean if true the cookie value will be unavailable to JavaScript + */ + private $_httpOnly=false; /** * Constructor. @@ -1002,6 +1006,22 @@ class THttpCookie extends TComponent $this->_expire=TPropertyValue::ensureInteger($value); } + /** + * @return boolean if true the cookie value will be unavailable to JavaScript + */ + public function getHttpOnly() + { + return $this->_httpOnly; + } + + /** + * @param boolean $value if true the cookie value will be unavailable to JavaScript + */ + public function setHttpOnly($value) + { + $this->_httpOnly = TPropertyValue::ensureBoolean($value); + } + /** * @return string the name of the cookie */ -- cgit v1.2.3