web\Request getCookies()

getCookies() public method

Returns the cookie collection.

Through the returned cookie collection, you may access a cookie using the following syntax:

$cookie = $request->cookies['name']
if ($cookie !== null) {
    $value = $cookie->value;
}

// alternatively
$value = $request->cookies->getValue('name');
public yii\web\CookieCollection getCookies ( )
return yii\web\CookieCollection

The cookie collection.

doc_Yii
2016-10-30 17:15:46
Comments
Leave a Comment

Please login to continue.