Added ability to pass multiple parameters to Cookie::has.
This commit is contained in:
parent
55eb2ecb08
commit
65dca24939
|
@ -83,14 +83,21 @@ public function send()
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determine if a cookie exists.
|
* Determine if a cookie or set of cookies exists.
|
||||||
*
|
*
|
||||||
* @param string $name
|
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public static function has($name)
|
public static function has()
|
||||||
{
|
{
|
||||||
return ( ! is_null(static::get($name)));
|
foreach (func_get_args() as $key)
|
||||||
|
{
|
||||||
|
if (is_null(static::get($key)))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue