You are here

public function ParameterBag::has in Zircon Profile 8.0

Same name in this branch
  1. 8.0 vendor/symfony/http-foundation/ParameterBag.php \Symfony\Component\HttpFoundation\ParameterBag::has()
  2. 8.0 vendor/symfony/dependency-injection/ParameterBag/ParameterBag.php \Symfony\Component\DependencyInjection\ParameterBag\ParameterBag::has()
Same name and namespace in other branches
  1. 8 vendor/symfony/http-foundation/ParameterBag.php \Symfony\Component\HttpFoundation\ParameterBag::has()

Returns true if the parameter is defined.

Parameters

string $key The key:

Return value

bool true if the parameter exists, false otherwise

File

vendor/symfony/http-foundation/ParameterBag.php, line 156

Class

ParameterBag
ParameterBag is a container for key/value pairs.

Namespace

Symfony\Component\HttpFoundation

Code

public function has($key) {
  return array_key_exists($key, $this->parameters);
}