本文整理汇总了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);
}