konapun/pdo-decorator

A decorator interface for PDO and some basic decorators

Installs: 17

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 1

pkg:composer/konapun/pdo-decorator

1.0.0 2014-12-10 19:54 UTC

This package is auto-updated.

Last update: 2025-10-10 11:20:07 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