Whether an ActionMessage exists for one of the specified keys, or for any key if no key was given.

@param  string|string[] $keys [optional] - message keys

@return bool
776911
public function isActionMessage($keys = null) {
        $messages = $this->getAttribute(ACTION_MESSAGES_KEY);
        if (!$messages)
            return $this->isActionError($keys);

        if (is_string($keys))
            $keys = [$keys];

        if (is_array($keys)) {
            foreach ($keys as $key) {
                if (key_exists($key, $messages)) return true;
            }
            if ($keys)
                return $this->isActionError($keys);
            $keys = null;
        }

        if (is_null($keys))
            return true;
        throw new IllegalTypeException('Illegal type of parameter $keys: '.gettype($keys));
    }
367160
public function flashExcept($keys)
    {
        $keys = is_array($keys) ? $keys : func_get_args();

        return $this->flash('except', $keys);
    }
13512
public function exists(string $key): bool
    {
        $result = $this->execute([
            [
                'command' => 'get',
                'key' => $key,
                'result' => ['key']
            ]
        ]);
        return isset($result[0]['key']);
    }
1254659
public function hasAction($key)
	{
		$condition = $this->datagrid->getRowCondition('action', $key);

		return $condition ? $condition($this->item) : true;
	}
811054
public function anyFilled($keys)
    {
        $keys = is_array($keys) ? $keys : func_get_args();

        foreach ($keys as $key) {
            if ($this->filled($key)) {
                return true;
            }
        }

        return false;
    }
1147210
public static function array_keys_exists(Array $keys, Array $object): bool
    {
        foreach ($keys as $key) {
            if (!array_key_exists($key, $object))
                return false;
        }
        return true;
    }
1000141
public function hasMany(array $keys)
    {
        foreach ($keys as $key) {
            if (!$this->has($key)) {
                return false;
            }
        }

        return true;
    }
1265581
public function remove($keys)
    {
        $keys = (array) $keys; // Cast all the things
        $this->keys = array_filter($this->keys(), function ($key) use ($keys) {
            foreach ($keys as $remove) {
                if (preg_match('/^'.preg_quote($remove, '/').'(\..+)?$/', $key)) {
                    // Keys and descendant keys will be removed
                    return false;
                }
            }

            return true;
        });
    }
1014542
public function has($key)
    {
        if ($key == 'message') {
            return !empty($this->message);
        }

        if ($key == 'exception') {
            return !is_null($this->exception);
        }

        return array_key_exists($key, $this->payload);
    }
741497
public function isActionError($keys = null) {
        $errors = $this->getAttribute(ACTION_ERRORS_KEY);
        if (!$errors)
            return false;

        if (is_string($keys))
            $keys = [$keys];

        if (is_array($keys)) {
            foreach ($keys as $key) {
                if (key_exists($key, $errors)) return true;
            }
            if ($keys)
                return false;
            $keys = null;
        }

        if (is_null($keys))
            return true;
        throw new IllegalTypeException('Illegal type of parameter $keys: '.gettype($keys));
    }
589479
final public static function exists($keys): bool {
		
		// initialize some vars
		$db			= Database::getInstance();
		$tableKey	= (array)static::TABLE_KEY;
		$conds		= array();

		foreach ($tableKey as $field) {
			$conds[] = $field . ' = ?';
		}
		
		$query = 'SELECT COUNT(1) FROM `' . static::TABLE_NAME . '` WHERE ' . implode(' AND ', $conds);
		
		// execute and return value
		return (bool)Database::load($query, (array)$keys, PAIR_DB_COUNT);
		
	}
432936
private function assertKeysArrayValid($keys = null)
    {
        if ((!$keys) ||
            (!is_array($keys)) ||
            (!isset($keys['auth'])) || 
            (!is_array($keys['auth'])) ||
            (!isset($keys['auth']['req'])) || 
            (!is_array($keys['auth']['req'])) ||
            (!isset($keys['auth']['opt'])) || 
            (!is_array($keys['auth']['opt'])) ||
            (!isset($keys['args'])) || 
            (!is_array($keys['args'])) ||
            (!isset($keys['args']['req'])) || 
            (!is_array($keys['auth']['req'])) ||
            (!isset($keys['args']['opt'])) || 
            (!is_array($keys['auth']['opt']))
        ) {
            $msg = 'Invalid API keys provided. (HINT: Each '
                 . 'API class must define a $keys array with '
                 . 'specific key requirements. (HINT: View an /Api/[file] '
                 . 'for an example.)';
            throw new ApiException($msg);
        }
    }
1060139
public function wasModified($keys = null)
    {
        $modified = $this->getModifiedData();
        $removedKeys = $this->getRemovedKeys();

        if (!$keys) {
            return (bool)$modified || (bool)$removedKeys;
        }

        $keys = is_array($keys) ? $keys : func_get_args();

        foreach ($keys as $key) {

            if (array_key_exists($key, $modified)) {
                return true;
            }

            if (in_array($key, $removedKeys)) {
                return true;
            }
        }

        return false;
    }
1253221
public function sunion($keys)
    {
        try {
            return $this->redis->sunion($keys);
        } catch (\RedisException $e) {
            die("Error!: " . $e->getMessage() . "<br/>");
        }
    }
1216914
public static function isAnyKeyNull(array $keys = []): bool
    {
        foreach ($keys as $key) {
            if ($key === null) {
                return true;
            }
        }

        return false;
    }
900802
private function isKeyRange($key, Array $keys)
    {
        if (empty($keys)) {
            return false;
            
        }
        return \reset($keys)->getKey() <= $key
            && \end($keys)->getKey() >= $key;
    }
972765
protected function checkKeyExists($data, $key)
    {
        if (!$data->has($key)) {
            $this->output->writeln("<error>The key $key does not exist.");

            return false;
        }

        return true;
    }