summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
Diffstat (limited to 'framework')
-rw-r--r--framework/Web/THttpRequest.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/framework/Web/THttpRequest.php b/framework/Web/THttpRequest.php
index 029fb240..293c73f1 100644
--- a/framework/Web/THttpRequest.php
+++ b/framework/Web/THttpRequest.php
@@ -737,6 +737,19 @@ class THttpCookieCollection extends TList
$this->_o->removeCookie($item);
return $item;
}
+
+ /**
+ * Finds the cookie with the specified name.
+ * @param string the name of the cookie to be looked for
+ * @return THttpCookie the cookie, null if not found
+ */
+ public function findCookieByName($name)
+ {
+ foreach($this as $cookie)
+ if($cookie->getName()===$name)
+ return $cookie;
+ return null;
+ }
}
/**