Skip to content

ServerRequest: getCookieParams Example

Terry L edited this page Jun 20, 2020 · 3 revisions
Clone this wiki locally

Shieldon\Psr7\ServerRequest

Extends Request.

getCookieParams()

Retrieves cookies sent by the client to the server.

  • return array

Example:

$cookieParams = $serverRequests->getCookieParams();

print(print_r($cookieParams, true));

/* Outputs:

    Array
    (
        [foo] => bar
    )

*/