public function AttributeBag::get

Returns an attribute.

Parameters

string $name The attribute name:

mixed $default The default value if not found.:

Return value

mixed

Overrides AttributeBagInterface::get

1 method overrides AttributeBag::get()
NamespacedAttributeBag::get in drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Attribute/NamespacedAttributeBag.php
Returns an attribute.

File

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

Class

AttributeBag
This class relates to session attribute storage

Namespace

Symfony\Component\HttpFoundation\Session\Attribute

Code

public function get($name, $default = null) {
  return array_key_exists($name, $this->attributes) ? $this->attributes[$name] : $default;
}