protected function encodeCookie(array $cookieParts)
    {
        foreach ($cookieParts as $cookiePart) {
            if (false !== strpos($cookiePart, self::COOKIE_DELIMITER)) {
                throw new \InvalidArgumentException(sprintf('$cookieParts should not contain the cookie delimiter "%s"', self::COOKIE_DELIMITER));
            }
        }

        return base64_encode(implode(self::COOKIE_DELIMITER, $cookieParts));
    }
protected function encodeCookie(array $cookieParts)
    {
        foreach ($cookieParts as $cookiePart) {
            if (false !== strpos($cookiePart, self::COOKIE_DELIMITER)) {
                throw new \InvalidArgumentException(sprintf('$cookieParts should not contain the cookie delimiter "%s"', self::COOKIE_DELIMITER));
            }
        }

        return base64_encode(implode(self::COOKIE_DELIMITER, $cookieParts));
    }
protected function encodeCookie ( array $ cookieParts ) { foreach ( $ cookieParts as $ cookiePart ) { if ( false !== strpos ( $ cookiePart , self :: COOKIE_DELIMITER ) ) { throw new \ InvalidArgumentException ( sprintf ( '$cookieParts should not contain the cookie delimiter "%s"' , self :: COOKIE_DELIMITER ) ) ; } } return base64_encode ( implode ( self :: COOKIE_DELIMITER , $ cookieParts ) ) ; }
Encodes the cookie parts.

@return string

@throws \InvalidArgumentException When $cookieParts contain the cookie delimiter. Extending class should either remove or escape it.
Encodes the cookie parts .