How to set a cookie?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

How to set a cookie?

Axel
Hi,

is there any way to set a cookie using the Zend\Http\Response object or
do we have to stick with setcookie()?
This is not documented anywhere (As most things aren't).

Best,
Axel
Reply | Threaded
Open this post in threaded view
|

Re: How to set a cookie?

Bas Kamer
Hi Alex

http://www.thecodehouse.com/2012/05/15/zf2-setting-a-cookie/

You might try searching google "zf2 setting cookies". First hit.

Bas

On 25 sep. 2012, at 13:29, Axel <[hidden email]> wrote:

> Hi,
>
> is there any way to set a cookie using the Zend\Http\Response object or do we have to stick with setcookie()?
> This is not documented anywhere (As most things aren't).
>
> Best,
> Axel

Reply | Threaded
Open this post in threaded view
|

Re: How to set a cookie?

Axel
Hi Bas,

thanks, that seems to work.
Wouldn't it be good to add this to the zf2 documentation?



Am 25.09.2012 13:50, schrieb Bas Kamer:

> Hi Alex
>
> http://www.thecodehouse.com/2012/05/15/zf2-setting-a-cookie/
>
> You might try searching google "zf2 setting cookies". First hit.
>
> Bas
>
> On 25 sep. 2012, at 13:29, Axel <[hidden email]> wrote:
>
>> Hi,
>>
>> is there any way to set a cookie using the Zend\Http\Response object or do we have to stick with setcookie()?
>> This is not documented anywhere (As most things aren't).
>>
>> Best,
>> Axel
>

Reply | Threaded
Open this post in threaded view
|

Re: How to set a cookie?

Frank Brückner
Am 25.09.2012, 15:24 Uhr, schrieb Axel <[hidden email]>:

> Hi Bas,
>
> thanks, that seems to work.
> Wouldn't it be good to add this to the zf2 documentation?

Open an issue: http://framework.zend.com/issues/browse/ZF2
or create a pull request: https://github.com/froschdesign/zf2-documentation

> Am 25.09.2012 13:50, schrieb Bas Kamer:
>> Hi Alex
>>
>> http://www.thecodehouse.com/2012/05/15/zf2-setting-a-cookie/
>>
>> You might try searching google "zf2 setting cookies". First hit.
>>
>> Bas
>>
>> On 25 sep. 2012, at 13:29, Axel <[hidden email]> wrote:
>>
>>> Hi,
>>>
>>> is there any way to set a cookie using the Zend\Http\Response object  
>>> or do we have to stick with setcookie()?
>>> This is not documented anywhere (As most things aren't).
>>>
>>> Best,
>>> Axel