public function AttributeBag::remove

Removes an attribute.

Parameters

string $name:

Return value

mixed The removed value

Overrides AttributeBagInterface::remove

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

File

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

Class

AttributeBag
This class relates to session attribute storage

Namespace

Symfony\Component\HttpFoundation\Session\Attribute

Code

public function remove($name) {
  $retval = null;
  if (array_key_exists($name, $this->attributes)) {
    $retval = $this->attributes[$name];
    unset($this->attributes[$name]);
  }
  return $retval;
}