Skip to content
Snippets Groups Projects
Commit 2942e64d authored by Demian Katz's avatar Demian Katz
Browse files

Created abstract wrapper for cookie setting.

parent d4931110
No related merge requests found
......@@ -282,9 +282,20 @@ class Cart
// Save the cookies:
$cookie = implode(self::CART_COOKIE_DELIM, $ids);
setcookie(self::CART_COOKIE, $cookie, 0, '/');
$this->setCookie(self::CART_COOKIE, $cookie, 0, '/');
$cookie = implode(self::CART_COOKIE_DELIM, $sources);
setcookie(self::CART_COOKIE_SOURCES, $cookie, 0, '/');
$this->setCookie(self::CART_COOKIE_SOURCES, $cookie, 0, '/');
}
/**
* Set a cookie (wrapper in case Zend Framework offers a better abstraction
* of cookie handling in the future).
*
* @return bool
*/
protected function setCookie()
{
return call_user_func_array('setcookie', func_get_args());
}
/**
......@@ -296,4 +307,4 @@ class Cart
{
return $this->recordLoader->loadBatch($this->items);
}
}
}
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment