Skip to content

Commit 967834c

Browse files
stancltaylorotwell
andauthored
[12.x] Add DatabaseStore::setConnection(), fix docblock for setLockConnection() (#56554)
* Add DatabaseStore::setConnection(), fix docblock for setLockConnection() * Add getLockConnection() for consistency * Update DatabaseStore.php --------- Co-authored-by: Taylor Otwell <[email protected]>
1 parent d6ad220 commit 967834c

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

src/Illuminate/Cache/DatabaseStore.php

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,30 @@ public function getConnection()
446446
}
447447

448448
/**
449-
* Specify the name of the connection that should be used to manage locks.
449+
* Set the underlying database connection.
450+
*
451+
* @param \Illuminate\Database\ConnectionInterface $connection
452+
* @return $this
453+
*/
454+
public function setConnection($connection)
455+
{
456+
$this->connection = $connection;
457+
458+
return $this;
459+
}
460+
461+
/**
462+
* Get the connection used to manage locks.
463+
*
464+
* @return \Illuminate\Database\ConnectionInterface
465+
*/
466+
public function getLockConnection()
467+
{
468+
return $this->lockConnection;
469+
}
470+
471+
/**
472+
* Specify the connection that should be used to manage locks.
450473
*
451474
* @param \Illuminate\Database\ConnectionInterface $connection
452475
* @return $this

0 commit comments

Comments
 (0)