public function MockFileSessionStorage::__construct in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/symfony/http-foundation/Session/Storage/MockFileSessionStorage.php \Symfony\Component\HttpFoundation\Session\Storage\MockFileSessionStorage::__construct()
Constructor.
Parameters
string $savePath Path of directory to save session files.:
string $name Session name.:
MetadataBag $metaBag MetadataBag instance.:
Overrides MockArraySessionStorage::__construct
File
- vendor/
symfony/ http-foundation/ Session/ Storage/ MockFileSessionStorage.php, line 39
Class
- MockFileSessionStorage
- MockFileSessionStorage is used to mock sessions for functional testing when done in a single PHP process.
Namespace
Symfony\Component\HttpFoundation\Session\StorageCode
public function __construct($savePath = null, $name = 'MOCKSESSID', MetadataBag $metaBag = null) {
if (null === $savePath) {
$savePath = sys_get_temp_dir();
}
if (!is_dir($savePath)) {
mkdir($savePath, 0777, true);
}
$this->savePath = $savePath;
parent::__construct($name, $metaBag);
}