Cookiejar is only used in Zend_Http, not the MVC components, so you get cookies via the Http_Request object and set them using Http_Cookie.
The source says: /** * A Zend_Http_CookieJar object is designed to contain and maintain HTTP cookies, and should * be used along with Zend_Http_Client in order to manage cookies across HTTP requests and * responses. * * The class contains an array of Zend_Http_Cookie objects. Cookies can be added to the jar * automatically from a request or manually. Then, the jar can find and return the cookies * needed for a specific HTTP request. * * A special parameter can be passed to all methods of this class that return cookies: Cookies * can be returned either in their native form (as Zend_Http_Cookie objects) or as strings - * the later is suitable for sending as the value of the "Cookie" header in an HTTP request. * You can also choose, when returning more than one cookie, whether to get an array of strings * (by passing Zend_Http_CookieJar::COOKIE_STRING_ARRAY) or one unified string for all cookies * (by passing Zend_Http_CookieJar::COOKIE_STRING_CONCAT). 2009/3/8 vadim gavrilov <[email protected]>: > Reading the documentation i didn't quite understood on how would i look for > a cookie without instantiating a new cookie object. I mean if i got it right > from the documentation in order to read a cookie i need to set one up first. > How about if i want to see if the cookie 'test' exists under the currently > used domain? What method do i need to use in order to do that? > > Anyone know what's the purpose of the CookieJar? I mean it adds the cookie > by the currently used url, Or one you specify. What's the difference between > the Zend_Http_Cookie and Zend_Http_CookieJar? > > Thanks. > -- > Vincent Gabriel. > Lead Developer, Senior Support. > Zend Certified Engineer. > > > > > -- ---------------------------------------------------------------------- [MuTe] ----------------------------------------------------------------------
