本文整理匯總了PHP中Arr::has方法的典型用法代碼示例。如果您正苦於以下問題:PHP Arr::has方法的具體用法?PHP Arr::has怎麽用?PHP Arr::has使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Arr
的用法示例。
在下文中一共展示了Arr::has方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: array_has
/**
* Check if an item exists in an array using "dot" notation.
*
* @param array $array
* @param string $key
* @return bool
*/
function array_has($array, $key)
{
return Arr::has($array, $key);
}
示例2: has
/**
* See if a key exists within session data using javascript dot notation
*
* @param string Session data key
* @returns boolean True if found
*/
public function has($key)
{
return Arr::has($_SESSION, $key);
}
示例3: has
/**
* Check if a key was set upon this bag's data
*
* @param string $key
* @return bool
* @since 2.0.0
*/
public function has($key)
{
$result = Arr::has($this->data, $key);
if (!$result and $this->parentEnabled) {
$result = $this->parent->has($key);
}
return $result;
}
示例4: has
/**
* Checks existence of a param using "dot notation" in the session.
*
* @param string $path
*
* @throws \LogicException If the session has not been started yet
*
* @return bool
*/
public final function has($path)
{
if (!$this->started()) {
throw new LogicException('The session has not been started yet.');
}
return Arr::has($this->data, $path);
}
示例5: has
/**
* Checks if the given key exists.
*
* @param string $key
* @return bool
*/
public function has($key)
{
return Arr::has($this->values, $key);
}