Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Cache] Support decorated Dbal drivers in PdoAdapter
- Loading branch information
Showing
4 changed files
with
86 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
src/Symfony/Component/Cache/Tests/Fixtures/DriverWrapper.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the Symfony package. | ||
* | ||
* (c) Fabien Potencier <fabien@symfony.com> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Symfony\Component\Cache\Tests\Fixtures; | ||
|
||
use Doctrine\DBAL\Connection; | ||
use Doctrine\DBAL\Driver; | ||
use Doctrine\DBAL\Platforms\AbstractPlatform; | ||
use Doctrine\DBAL\Schema\AbstractSchemaManager; | ||
|
||
class DriverWrapper implements Driver | ||
{ | ||
/** @var Driver */ | ||
private $driver; | ||
|
||
public function __construct(Driver $driver) | ||
{ | ||
$this->driver = $driver; | ||
} | ||
|
||
public function connect(array $params, $username = null, $password = null, array $driverOptions = []): Driver\Connection | ||
{ | ||
return $this->driver->connect($params, $username, $password, $driverOptions); | ||
} | ||
|
||
public function getDatabasePlatform(): AbstractPlatform | ||
{ | ||
return $this->driver->getDatabasePlatform(); | ||
} | ||
|
||
public function getSchemaManager(Connection $conn, AbstractPlatform $platform): AbstractSchemaManager | ||
{ | ||
return $this->driver->getSchemaManager($conn, $platform); | ||
} | ||
|
||
public function getExceptionConverter(): Driver\API\ExceptionConverter | ||
{ | ||
return $this->driver->getExceptionConverter(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters