public function AttributeBag::replace

Sets attributes.

Parameters

array $attributes Attributes:

Overrides AttributeBagInterface::replace

File

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

Class

AttributeBag
This class relates to session attribute storage

Namespace

Symfony\Component\HttpFoundation\Session\Attribute

Code

public function replace(array $attributes) {
  $this->attributes = array();
  foreach ($attributes as $key => $value) {
    $this
      ->set($key, $value);
  }
}