public function NamespacedAttributeBag::remove

Removes an attribute.

Parameters

string $name:

Return value

mixed The removed value

Overrides AttributeBag::remove

File

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

Class

NamespacedAttributeBag
This class provides structured storage of session attributes using a name spacing character in the key.

Namespace

Symfony\Component\HttpFoundation\Session\Attribute

Code

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