private function matchesPath($requestPath, $cookiePath)
{
if ($requestPath === $cookiePath) {
$isMatch = true;
} elseif (strpos($requestPath, $cookiePath) === 0 && (substr($cookiePath, -1) === '/' || $requestPath[strlen($cookiePath)] === '/')) {
$isMatch = true;
} else {
$isMatch = false;
}
return $isMatch;
}