web\Response getCookies()

getCookies() public method

Returns the cookie collection.

Through the returned cookie collection, you add or remove cookies as follows,

// add a cookie
$response->cookies->add(new Cookie([
    'name' => $name,
    'value' => $value,
]);

// remove a cookie
$response->cookies->remove('name');
// alternatively
unset($response->cookies['name']);
public yii\web\CookieCollection getCookies ( )
return yii\web\CookieCollection

The cookie collection.

doc_Yii
2016-10-30 17:16:17
Comments
Leave a Comment

Please login to continue.