$id
$id : string
MockFileSessionStorage is used to mock sessions for functional testing where you may need to persist session data across separate PHP processes.
No PHP session is actually started since a session can be initialized and shutdown only once per PHP execution cycle and this class does not pollute any session related globals, including session_() functions or session. PHP ini directives.
$id : string
$name : string
$started : bool
$closed : bool
$data : array
$metadataBag : \Symfony\Component\HttpFoundation\Session\Storage\MetadataBag
$bags : array|\Symfony\Component\HttpFoundation\Session\SessionBagInterface[]
__construct(string|null $savePath = null, string $name = 'MOCKSESSID', \Symfony\Component\HttpFoundation\Session\Storage\MetadataBag $metaBag = null) : mixed
string|null | $savePath | Path of directory to save session files |
string | $name | |
\Symfony\Component\HttpFoundation\Session\Storage\MetadataBag | $metaBag |
regenerate(bool $destroy = false, int $lifetime = null) : bool
Regenerates id that represents this storage.
bool | $destroy | Destroy session when regenerating? |
int | $lifetime | Sets the cookie lifetime for the session cookie. A null value will leave the system settings unchanged, 0 sets the cookie to expire with browser session. Time is in seconds, and is not a Unix timestamp. |