Zend\Http\Cookies::getCookie
Get a specific cookie according to a URI and name
Signature
public function getCookie(Uri|string
$uri,
[string
$cookieName = self::COOKIE_OBJECT,
[int
$retAs = self::COOKIE_OBJECT]] )
Parameters
$uri
—
object
- The uri (domain and path) to match
$cookieName
—
string
- The cookie's name
$retAs
—
int
- Whether to return cookies as objects of \Zend\Http\Header\SetCookie or as strings
Returns
- SetCookie|string
Errors/Exceptions
-
InvalidArgumentException
- if invalid URI specified or invalid $retAs value