protected function checkCookie()
    {
        if (is_array($this->cookie) && count($this->cookie)) {
            foreach ($this->cookie as $name => $value) {
                switch ($name) {
                    case 'domain':
                    case 'path':
                        $this->addCookieOption($name, $value);
                        break;
                    case 'max-age':
                    case 'expires':
                        $this->addCookieIntOption($name, $value);
                        break;
                    case 'secure':
                        $this->addCookieBoolOption($name, $value);
                        break;
                }
            }
        }
    }