public function Session::has

Checks if an attribute is defined.

@api

Parameters

string $name The attribute name:

Return value

Boolean true if the attribute is defined, false otherwise

Overrides SessionInterface::has

File

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

Class

Session
Session.

Namespace

Symfony\Component\HttpFoundation\Session

Code

public function has($name) {
  return $this->storage
    ->getBag($this->attributeName)
    ->has($name);
}