Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. MockArraySessionStorage.php

function MockArraySessionStorage::regenerate

Overrides SessionStorageInterface::regenerate

2 calls to MockArraySessionStorage::regenerate()
MockFileSessionStorage::regenerate in vendor/symfony/http-foundation/Session/Storage/MockFileSessionStorage.php
Regenerates id that represents this storage.
MockFileSessionStorage::regenerate in vendor/symfony/http-foundation/Session/Storage/MockFileSessionStorage.php
Regenerates id that represents this storage.
1 method overrides MockArraySessionStorage::regenerate()
MockFileSessionStorage::regenerate in vendor/symfony/http-foundation/Session/Storage/MockFileSessionStorage.php
Regenerates id that represents this storage.

File

vendor/symfony/http-foundation/Session/Storage/MockArraySessionStorage.php, line 68

Class

MockArraySessionStorage
MockArraySessionStorage mocks the session for unit tests.

Namespace

Symfony\Component\HttpFoundation\Session\Storage

Code

public function regenerate(bool $destroy = false, ?int $lifetime = null) : bool {
    if (!$this->started) {
        $this->start();
    }
    $this->metadataBag
        ->stampNew($lifetime);
    $this->id = $this->generateId();
    return true;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal