protected function getCookiesPrepared() {
        $cookies = [];
        if ($this->_cookies) {
            $request = $this->app->reqHelper;
            if ($request->enableCookieValidation) {
                if ($request->cookieValidationKey == '') {
                    throw new InvalidConfigException(get_class($request) . '::cookieValidationKey must be configured with a secret key.');
                }
                $validationKey = $request->cookieValidationKey;
            } else {
                $validationKey = null;
            }
            foreach ($this->getCookies() as $name => $cookie) {
                /** @var Cookie $cookie */
                $cookies[] = $cookie->getForHeader($validationKey);
            }
        }

        return $cookies;
    }
protected function getCookiesPrepared() {
        $cookies = [];
        if ($this->_cookies) {
            $request = $this->app->reqHelper;
            if ($request->enableCookieValidation) {
                if ($request->cookieValidationKey == '') {
                    throw new InvalidConfigException(get_class($request) . '::cookieValidationKey must be configured with a secret key.');
                }
                $validationKey = $request->cookieValidationKey;
            } else {
                $validationKey = null;
            }
            foreach ($this->getCookies() as $name => $cookie) {
                /** @var Cookie $cookie */
                $cookies[] = $cookie->getForHeader($validationKey);
            }
        }

        return $cookies;
    }
protected function getCookiesPrepared ( ) { $ cookies = [ ] ; if ( $ this -> _cookies ) { $ request = $ this -> app -> reqHelper ; if ( $ request -> enableCookieValidation ) { if ( $ request -> cookieValidationKey == '' ) { throw new InvalidConfigException ( get_class ( $ request ) . '::cookieValidationKey must be configured with a secret key.' ) ; } $ validationKey = $ request -> cookieValidationKey ; } else { $ validationKey = null ; } foreach ( $ this -> getCookies ( ) as $ name => $ cookie ) { /** @var Cookie $cookie */ $ cookies [ ] = $ cookie -> getForHeader ( $ validationKey ) ; } } return $ cookies ; }
Get cookies prepared for 'Set-Cookie' header
@return string[]
@throws InvalidConfigException
Get cookies prepared for Set - Cookie header