ZF-845: Multi cookie
Description
It would be great a multi cookie support (see http://www.zend.com/codex.php?id=679&single=1).
According to multi cookie idea Zend_Http_Cookie::setValue() should be able to accept an array as argument and choose to serialize or not stored data depending on cookie type (multi or single value). Zend_Http_Cookie::getValue() should return a single value or an array.
Comments
Posted by Shahar Evron (shahar) on 2007-02-05T11:19:23.000+0000
Hi,
This is a bit problematic as far as I am concerned because I am not aware of any "standard" way of serializing arrays as a cookie value. Remember that the Http_Client is used to communicate with many different web servers running many different apps and languages - not just PHP.
You could always overload the Zend_Http_Cookie class to support this for your own needs. I suggest you open a discussion about this in fw-webservices@lists.zend.com and see what the community suggest.
Posted by Simone Carletti (weppos) on 2007-02-05T13:09:21.000+0000
{quote} This is a bit problematic as far as I am concerned because I am not aware of any "standard" way of serializing arrays as a cookie value. {quote}
You're right, but consider that serialize and unserialize process will be done by Zend_Http_Cookie class and outside data will be set and get using arrays. Data stream will be
array() --> Zend_Http_Cookie --> serialize() --> cookie and cookie --> unserialize() --> Zend_Http_Cookie --> array()
Actually data stream is
string --> Zend_Http_Cookie --> cookie and cookie --> Zend_Http_Cookie --> string
{quote} You could always overload the Zend_Http_Cookie class to support this for your own needs. I suggest you open a discussion about this in fw-webservices@lists.zend.com and see what the community suggest. {quote}
Thanks for your suggestion! I will try to code something and I will share my ideas on web services mailing list. :)
Posted by Shahar Evron (shahar) on 2007-03-02T07:09:16.000+0000
Please reopen this as an improvement suggestion if you think this is still important after discussing with fw-webservices@lists.zend.com
Shahar.