检查配置是否存在

@access public
@param string $key 形似a.b.c的key
@return bool
11042
public function has($key) {
		$this->refresh();
		$keys = explode('.', $key);
		$conf = $this->cache;
		foreach ($keys as $v) {
			if (isset($conf[$v])) {
				$conf = $conf[$v];
			} else {
				return false;
			}
		}
		return true;
	}
79293
public function hasKey($key)
    {
        if ($this->cache->hasKey($key)) {
            return true;
        }
        $row = $this->database->table($this->config['db_table'])->where('key', $key)->first(['value']);

        return (count($row) > 0);
    }
417126
public function has($key)
    {
        $keys = explode('.', (string)$key);
        $data = &$this->data;
        foreach ($keys as $key) {
            if (!isset($data[$key])) {
                return false;
            }
            $data = &$data[$key];
        }

        return true;
    }
1030559
public function getKey($key) {
		$out = NULL;
		if ($this->hasKey($key)) {
			$out = $this->key[$key];
			unset($this->key[$key]);
		}
		return $out;
	}
77941
public function has($key)
    {
        try {
            $ttlColumn = $this->columns['ttl'];

            return (bool) $this->db->from($this->table)
                    ->where($this->columns['key'])->eq($this->prefix . $key)
                    ->andWhere(function ($group) use ($ttlColumn) {
                        $group->where($ttlColumn)->eq(0)
                        ->orWhere($ttlColumn)->gt(time());
                    })
                    ->count();
        } catch (PDOException $e) {
            return false;
        }
    }
1310949
public function getConfig(string $key)
    {
        //使用回调函数
        if (self::$config instanceof \Closure) {
            return call_user_func(self::$config, $key);
        } //直接注册数组
        elseif (is_array(self::$config)) {
            if (preg_match('@^(\w+)\.(.+)$@', $key, $m)) {
                $name = trim($m[1]);
                $key = trim($m[2]);
                if (isset(self::$config[$name]) && isset(self::$config[$name][$key])) {
                    return self::$config[$name][$key];
                }
                return null;
            }
            return isset(self::$config[$key]) ? self::$config[$key] : null;
        } //使用实例
        elseif (self::$config != null && method_exists(self::$config, 'get')) {
            return self::$config->get($key);
        }
        return null;
    }
1229019
public static function has(string $key):bool
    {
        return self::getViewHelper()->getView()->getValue($key) !== null;
    }
1193687
public function __isset($key)
    {
        $source = $this->getData();

        return \array_key_exists($key, $source) && null !== $source[$key];
    }
854925
public function read($key)
    {
        try {
            $cache = $this->db->from($this->table)
                ->where($this->columns['key'])->eq($this->prefix . $key)
                ->select()
                ->fetchAssoc()
                ->first();
        } catch (PDOException $e) {
            return false;
        }

        if ($cache !== false) {
            $expire = (int) $cache[$this->columns['ttl']];

            if ($expire === 0 || time() < $expire) {
                return unserialize($cache[$this->columns['data']]);
            }

            $this->delete($key);
        }

        return false;
    }
1014555
public function hasByKey($key) {
		$nullValue = ClassHelper::createObject(NullValue::class);
		$value = $this->getByKey($key, $nullValue);
		if($value instanceof NullValue) {
			return false;
		}
		return true;
	}
1186861
public function get($key)
    {
        $md5 = md5($key);
        $folderPath = $this->getFolderPathFromMd5($md5);
        $path = $this->path . self::DS . $folderPath . self::DS . $this->prefix . $md5;
        if (!file_exists($path) || !is_readable($path)) {
            return false;
        }

        $content = file_get_contents($path);
        if (!$content) {
            return false;
        }

        $pieces = explode(PHP_EOL, $content);
        if (!is_array($pieces) || !is_numeric($pieces[0])) {
            unlink($path);
            return false;
        }

        $val = @unserialize($pieces[1]);
        if ($val === false) {
            $this->remove($key);
            return false;
        }

        return $val;
    }
700344
public function __isset($key)
    {
        switch (true) {
            case isset($this->_params[$key]):
                return true;
            case isset($_GET[$key]):
                return true;
            case isset($_POST[$key]):
                return true;
            case isset($_COOKIE[$key]):
                return true;
            case isset($_SERVER[$key]):
                return true;
            case isset($_ENV[$key]):
                return true;
            default:
                return false;
        }
    }
1339593
public function has($key = null)
    {
        if ($key === null) {
            return $this->count() > 0;
        }

        $arr = &$this->getStackByReference($key);

        return is_array($arr) ? array_key_exists($key, $arr) : false;
    }
204401
protected function isAllowedKey($key): bool
    {
        return empty($this->allowedKeys) || \in_array($key, $this->allowedKeys, true);
    }
469845
public function unlock($key): bool
    {
        if (!$this->fp) {
            throw new \LogicException('Please use lock() before unlock.');
        }

        // 释放锁定
        $ret = flock($this->fp, LOCK_UN);
        fclose($this->fp);
        $this->fp = null;

        return $ret;
    }
400689
public function has(string $key): bool
    {
        return array_key_exists(strtolower($key), $this->keyMap) &&
            array_key_exists($this->keyMap[strtolower($key)], $this->collection);
    }
602663
protected function hasKey($key)
    {
        return ($this->mode == self::MODE_INDEXED && $key == '') || \array_key_exists($key, $this->params);
    }