-
Notifications
You must be signed in to change notification settings - Fork 1
ServerRequest: withoutAttribute Example
Terry L edited this page Jun 20, 2020
·
3 revisions
Shieldon\Psr7\ServerRequest
Extends Request.
Return an instance that removes the specified derived request attribute.
-
param
string
name*
The attribute name. -
return
static
Example:
$serverRequest = $serverRequest->withoutAttribute('ip_address');
$ip = $serverRequest->getAttribute('ip_address', 'undefined');
echo $ip
// Outputs: undefined
composer require shieldon/psr-http
Shieldon PSR HTTP implementation written by Terry L. from Taiwan.