protected function encodeCookies(Response $response)
    {
        $cookies = $response->getCookieCollection();
        foreach ($cookies as $cookie) {
            if (in_array($cookie->getName(), $this->cookieNames, true)) {
                $value = $this->_encrypt($cookie->getValue(), $this->cipherType);
                $response = $response->withCookie($cookie->withValue($value));
            }
        }

        return $response;
    }
protected function encodeCookies(Response $response)
    {
        $cookies = $response->getCookieCollection();
        foreach ($cookies as $cookie) {
            if (in_array($cookie->getName(), $this->cookieNames, true)) {
                $value = $this->_encrypt($cookie->getValue(), $this->cipherType);
                $response = $response->withCookie($cookie->withValue($value));
            }
        }

        return $response;
    }
protected function encodeCookies ( Response $ response ) { $ cookies = $ response -> getCookieCollection ( ) ; foreach ( $ cookies as $ cookie ) { if ( in_array ( $ cookie -> getName ( ) , $ this -> cookieNames , true ) ) { $ value = $ this -> _encrypt ( $ cookie -> getValue ( ) , $ this -> cipherType ) ; $ response = $ response -> withCookie ( $ cookie -> withValue ( $ value ) ) ; } } return $ response ; }
Encode cookies from a response's CookieCollection.

@param \Cake\Http\Response $response The response to encode cookies in.
@return \Cake\Http\Response Updated response with encoded cookies.
Encode cookies from a response s CookieCollection .