konapun / pdo-decorator
A decorator interface for PDO and some basic decorators
1.0.0
2014-12-10 19:54 UTC
Requires
- php: >=5.3
This package is auto-updated.
Last update: 2024-11-10 09:22:38 UTC
README
A decorator interface for PDO and some basic decorators
use PDO\Decorator\TimedQueryDecorator as TimedDecorator; $showTime = true; $basePDO = new PDO($dsn, $username, $passwd); $timedPDO = new TimedDecorator($basePDO, $showTime); // From here, use $timedPDO just as you'd use $basePDO
Creating decorators
A single decorator, TimedQueryDecorator, is included which both gives execution time for decorated queries and also serves as an example for creating your own PDO decorators