Does the handler have an error for the given key ?

@param string $key[optional]
The optionnal error key

@return boolean If the handler contains errors
164078
public function hasErrors($key = NULL)
    {
        if ($key) {
            return isset($this[$key]);
        } else {
            if (count($this)) {
                return true;
            } else {
                return false;
            }
        }
    }
1024320
public function has($key = '')
    {
        try {
            if ($this->cacheInstance !== NULL && is_object($this->cacheInstance)) {
                /**
                 * @var $cache object
                 */
                $cache = $this->cacheInstance->getItem($key);
                if (!$cache->isHit()) {
                    return FALSE;
                } else {
                    return TRUE;
                }
            } else {
                $this->debug->error(__FUNCTION__, 'Unavailable cacheInstance');

                return FALSE;
            }
        }
        catch (\Exception $e) {
            $message = 'Error File: ' . $e->getFile() . ' - Line: ' . $e->getLine() . ' - Code: ' . $e->getCode() . ' - Message: ' . $e->getMessage();
            $this->debug->error(__FUNCTION__, $message);

            return $message;
        }
    }
1300431
public function has($key)
    {
        return (bool) $this->redis->exists($this->redis->prefix($key));
    }
955785
public function containsKey(string $key): bool
    {
        if (isset($this->orgData[$key])) {
            return ! isset($this->removeAttributes[$key]);
        } else {
            return isset($this->addAttributes[$key]);
        }
    }
742081
protected function required(string $key) : bool
    {
        $val = $this->param[$key];

        if (is_string($val) && strlen(trim($val)) == 0) {
            $this->errors[$key.self::ERROR] =
                ucfirst($this->convertToFieldName($key)).' is required';

            return false;
        } elseif (is_array($val) && count($val) < 1) {
            $this->errors[$key.self::ERROR] =
                ucfirst($this->convertToFieldName($key)).' is required';

            return false;
        }

        return true;
    }
96912
public function isOptionKeyValid($key)
    {
        self::parseValidKeys();

        if (isset(self::$validOptions[$key])) {
            return true;
        }

        return false;
    }
278503
public function getErrorsByKey($key)
    {
        if (!is_string($key)) {
            throw new \Exception('Key must be a string');
        }
        
        $errors = array_filter($this->errors, function ($el) use ($key) {
            return $el['key'] === $key;
        });
        
        return $errors;
    }
385768
public function __isset($key)
    {
        if (!is_string($key) && !is_integer($key)) {
            throw new \Exception('Error the key (' . gettype($key) . ') is not a string or an integer : ' . json_encode($key));
        }

        return array_key_exists($key, $this->collection);
    }
993687
public function getErrors($key = null) {
        if (isset($key)) {
            return !empty($this->errors[$key]) ? $this->errors[$key] : array();
        }
        else {
            return $this->errors;
        }
    }
1272476
public function addError($error, $key = null)
    {
        if (is_string($error)) {
            $error = new Exception($error);
        } elseif ($error instanceof Exception) {
            // Nothing to do
        } else {
            throw new Exception('only string errors or instances of Exception can be added');
        }

        if ($key) {
            $this->errors[$key] = $error;
        } else {
            $this->errors[] = $error;
        }

        return false;
    }
548251
public function __isset(string $key)
    {
        if (method_exists($this, $key)) {
            return true;
        }

        return isset($this->wrappedObject->$key);
    }
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);
    }
355978
public static function shouldBePlural($key)
    {
        $config = self::getArrayBaseValue('plural_names_for', [
            'controller-name' => true,
            'request-form-name' => true,
            'route-group' => true,
            'language-file-name' => true,
            'resource-file-name' => true,
            'table-name' => true,
        ]);

        if (isset($config[$key])) {
            return (bool) $config[$key];
        }

        return ($key != 'model-name');
    }
698705
public function exists(string $key): bool
    {
        return $this->handle->hExists($this->name, $key);
    }
266238
public function exists(?string $key = null) : bool
    {
        $key = $this->constructKey($key);

        return $this->parseKey($key, function ($part, $result) {
            return array_key_exists($part, $result);
        });
    }
1209463
function has($key)
    {
        try {
            return (bool) $this->client->exists($this->_getKey($key));
        } catch (\Exception $e) {
            throw new exReadError($e->getMessage(), $e->getCode(), $e);
        }
    }
578242
public function exists($key) {

		if(false === is_string($key) && false === is_array($key)) {
   			return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string or array, "%s" given', __METHOD__, gettype($key)), E_USER_ERROR);
   		}

   		if(0 === strlen($key)) {
   			return trigger_error(sprintf('Argument 1 passed to %s() may not be an empty string', __METHOD__), E_USER_ERROR);
   		}

		return apcu_exists($key);
	}