Как из объекта GuzzleHttp\Psr7\Response вытащить определенную часть?
После авторизации на сайте через guzzle и запроса cookie, возвращает такой объект
object(GuzzleHttp\Psr7\Response)#33 (6) {
["reasonPhrase":"GuzzleHttp\Psr7\Response":private]=>
string(2) "OK"
["statusCode":"GuzzleHttp\Psr7\Response":private]=>
int(200)
["headers":"GuzzleHttp\Psr7\Response":private]=>
array(10) {
["Server"]=>
array(1) {
[0]=> string(21) "nginx/1.18.0 (Ubuntu)"
}
["Date"]=>
array(1) {
[0]=> string(29) "Wed, 24 Nov 2021 13:33:28 GMT"
}
["Content-Type"]=>
array(1) {
[0]=> string(24) "text/html; charset=utf-8"
}
["Content-Length"]=>
array(1) {
[0]=> string(4) "2504"
}
["Connection"]=>
array(1) { [0]=> string(10) "keep-alive"
}
["X-Frame-Options"]=>
array(1) {
[0]=> string(4) "DENY"
}
["Vary"]=>
array(1) {
[0]=> string(6) "Cookie"
}
["X-Content-Type-Options"]=>
array(1) {
[0]=> string(7) "nosniff"
}
["Referrer-Policy"]=>
array(1) {
[0]=> string(11) "same-origin"
}
["Set-Cookie"]=>
array(1) {
[0]=> string(153) "csrftoken=ovUMpXKW0GekKVTdN1ntF1teYYkqtyNE3pws2i7N437sYuZv1nhzKtl1uQ5STnpi; expires=Wed, 23 Nov 2022 13:33:28 GMT; Max-Age=31449600; Path=/; SameSite=Lax"
}
}
["headerNames":"GuzzleHttp\Psr7\Response":private]=>
array(10) {
["server"]=> string(6) "Server"
["date"]=> string(4) "Date"
["content-type"]=> string(12) "Content-Type"
["content-length"]=> string(14) "Content-Length"
["connection"]=> string(10) "Connection"
["x-frame-options"]=> string(15) "X-Frame-Options"
["vary"]=> string(4) "Vary"
["x-content-type-options"]=> string(22) "X-Content-Type-Options"
["referrer-policy"]=> string(15) "Referrer-Policy"
["set-cookie"]=> string(10) "Set-Cookie"
}
["protocol":"GuzzleHttp\Psr7\Response":private]=> string(3) "1.1"
["stream":"GuzzleHttp\Psr7\Response":private]=>
object(GuzzleHttp\Psr7\Stream)#17 (7) {
["stream":"GuzzleHttp\Psr7\Stream":private]=> resource(65) of type (stream)
["size":"GuzzleHttp\Psr7\Stream":private]=> NULL
["seekable":"GuzzleHttp\Psr7\Stream":private]=> bool(true)
["readable":"GuzzleHttp\Psr7\Stream":private]=> bool(true)
["writable":"GuzzleHttp\Psr7\Stream":private]=> bool(true)
["uri":"GuzzleHttp\Psr7\Stream":private]=> string(10) "php://temp"
["customMetadata":"GuzzleHttp\Psr7\Stream":private]=> array(0) { }
}
}
как работать с ним? А точнее как вытащить только ["Set-Cookie"]=> array(1) { [0]=> string(153) "csrftoken=ovUMpXKW0GekKVTdN1ntF1teYYkqtyNE3pws2i7N437sYuZv1nhzKtl1uQ5STnpi; expires=Wed, 23 Nov 2022 13:33:28 GMT; Max-Age=31449600; Path=/; SameSite=Lax" } Помогите пожалуйста. Работаю с guzzle на PHP