public function withAttributes(array $attributes)
    {
        $serverRequest = $this->serverRequest;

        foreach ($attributes as $attribute => $value) {
            $serverRequest = $serverRequest->withAttribute($attribute, $value);
        }

        return new static($serverRequest);
    }
public function withAttributes(array $attributes)
    {
        $serverRequest = $this->serverRequest;

        foreach ($attributes as $attribute => $value) {
            $serverRequest = $serverRequest->withAttribute($attribute, $value);
        }

        return new static($serverRequest);
    }
public function withAttributes ( array $ attributes ) { $ serverRequest = $ this -> serverRequest ; foreach ( $ attributes as $ attribute => $ value ) { $ serverRequest = $ serverRequest -> withAttribute ( $ attribute , $ value ) ; } return new static ( $ serverRequest ) ; }
Create a new instance with the specified derived request attributes.

Note: This method is not part of the PSR-7 standard.

This method allows setting all new derived request attributes as
described in getAttributes().

This method MUST be implemented in such a way as to retain the
immutability of the message, and MUST return a new instance that has the
updated attributes.

@param  array $attributes New attributes
@return static
Create a new instance with the specified derived request attributes .