Skip to content

[2.3] [Bridge] [Doctrine] made session table columns configurable through cons... #13136

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions src/Symfony/Bridge/Doctrine/HttpFoundation/DbalSessionHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,28 +40,34 @@ class DbalSessionHandler implements \SessionHandlerInterface
/**
* @var string Column for session id
*/
private $idCol = 'sess_id';
private $idCol;

/**
* @var string Column for session data
*/
private $dataCol = 'sess_data';
private $dataCol;

/**
* @var string Column for timestamp
*/
private $timeCol = 'sess_time';
private $timeCol;

/**
* Constructor.
*
* @param Connection $con A connection
* @param string $tableName Table name
* @param Connection $con A database connection handler
* @param string $tableName The session table name
* @param string $idColumn The session id table column
* @param string $dataColumn The session data table column
* @param string $timeColumn The session time table column
*/
public function __construct(Connection $con, $tableName = 'sessions')
public function __construct(Connection $con, $tableName = 'sessions', $idColumn = 'sess_id', $dataColumn = 'sess_data', $timeColumn = 'sess_time')
{
$this->con = $con;
$this->table = $tableName;
$this->idCol = $idColumn;
$this->dataCol = $dataColumn;
$this->timeCol = $timeColumn;
}

/**
Expand Down
Loading