/** @var array<string, string> $sessionOptions */
$sessionOptions =
$container->
getParameter('shopware.backendsession'
);
if (isset($sessionOptions['save_handler'
]) &&
$sessionOptions['save_handler'
] !== 'db'
) { return null;
} /** @var array<string, string> $dbOptions */
$dbOptions =
$container->
getParameter('shopware.db'
);
$conn = Db::
createPDO($dbOptions);
return new PdoSessionHandler( $conn,
[ 'db_table' => 's_core_sessions_backend',
'db_id_col' => 'id',
'db_data_col' => 'data',
'db_expiry_col' => 'expiry',
'db_time_col' => 'modified',
'lock_mode' =>
$sessionOptions['locking'
] ? PdoSessionHandler::LOCK_TRANSACTIONAL : PdoSessionHandler::LOCK_NONE,
] );
}}