Commit 65dca249 authored by Taylor Otwell's avatar Taylor Otwell

Added ability to pass multiple parameters to Cookie::has.

parent 55eb2ecb
......@@ -83,14 +83,21 @@ class Cookie {
}
/**
* Determine if a cookie exists.
* Determine if a cookie or set of cookies exists.
*
* @param string $name
* @return bool
*/
public static function has($name)
public static function has()
{
foreach (func_get_args() as $key)
{
if (is_null(static::get($key)))
{
return ( ! is_null(static::get($name)));
return false;
}
}
return true;
}
/**
......
Markdown is supported
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