/**
  * Returns true if the current cookie matches the supplied request.
  *
  * @return boolean
  */
 public function matchesRequest(RequestInterface $request)
 {
     // domain
     if (!$this->matchesDomain(parse_url($request->getHost(), PHP_URL_HOST))) {
         return false;
     }
     // path
     if (!$this->matchesPath($request->getResource())) {
         return false;
     }
     // secure
     if ($this->hasAttribute(static::ATTR_SECURE) && !$request->isSecure()) {
         return false;
     }
     return true;
 }