Final Class Yiisoft\RequestProvider\RequestCookieProvider
| Inheritance | Yiisoft\ |
|---|
Public Methods
| Method | Description | Defined By |
|---|---|---|
| __construct() | Yiisoft\ |
|
| get() | Yiisoft\ |
|
| has() | Yiisoft\ |
Method Details
| public mixed __construct ( Yiisoft\ | ||
| $requestProvider | Yiisoft\ |
|
public function __construct(
private readonly RequestProviderInterface $requestProvider,
) {}
| public ?string get ( string $name ) | ||
| $name | string | |
public function get(string $name): ?string
{
/**
* @var string|null Cookie value is always string.
*/
return $this->requestProvider->get()->getCookieParams()[$name] ?? null;
}
User Contributed Notes
Leave a comment
Join the conversation to share a note.