public function NativeSessionStorage::registerBag

Registers a SessionBagInterface for use.

Parameters

SessionBagInterface $bag:

Overrides SessionStorageInterface::registerBag

File

drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php, line 245

Class

NativeSessionStorage
This provides a base class for session attribute storage.

Namespace

Symfony\Component\HttpFoundation\Session\Storage

Code

public function registerBag(SessionBagInterface $bag) {
  $this->bags[$bag
    ->getName()] = $bag;
}