private function setOptions(array $options = array())
{
// Set the cookie owner's IP address and domain.
$this->ip = $_SERVER['REMOTE_ADDR'];
$this->domain = $_SERVER['HTTP_HOST'];
if (isset($options['expire'])) {
$this->expire = (int) $options['expire'];
}
if (isset($options['path'])) {
$this->path = $options['path'];
}
if (isset($options['domain'])) {
$this->domain = $options['domain'];
}
if (isset($options['secure'])) {
$this->secure = (bool) $options['secure'];
}
if (isset($options['httponly'])) {
$this->httponly = (bool) $options['httponly'];
}
}