You are here

public function AttributeBag::replace in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/http-foundation/Session/Attribute/AttributeBag.php \Symfony\Component\HttpFoundation\Session\Attribute\AttributeBag::replace()

Sets attributes.

Parameters

array $attributes Attributes:

Overrides AttributeBagInterface::replace

File

vendor/symfony/http-foundation/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);
  }
}