public function AttributeBag::has

Checks if an attribute is defined.

Parameters

string $name The attribute name:

Return value

Boolean true if the attribute is defined, false otherwise

Overrides AttributeBagInterface::has

1 method overrides AttributeBag::has()
NamespacedAttributeBag::has in drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Attribute/NamespacedAttributeBag.php
Checks if an attribute is defined.

File

drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Attribute/AttributeBag.php, line 73

Class

AttributeBag
This class relates to session attribute storage

Namespace

Symfony\Component\HttpFoundation\Session\Attribute

Code

public function has($name) {
  return array_key_exists($name, $this->attributes);
}