summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorxue <>2006-03-04 22:45:47 +0000
committerxue <>2006-03-04 22:45:47 +0000
commit8f832dcba3ca846b5ef22cb8c4b3168d744f5418 (patch)
tree4f9be277f250fbe04d6eeecd51bda5b5524e6720 /framework
parent51ccd340f64a7e0e84a1c5fade6a4504a66990f5 (diff)
Added findCookieByName.
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;
+ }
}
/**