Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/konapun/pdo-decorator
Decorator pattern for PDO and some included decorators
https://github.com/konapun/pdo-decorator
Last synced: 22 days ago
JSON representation
Decorator pattern for PDO and some included decorators
- Host: GitHub
- URL: https://github.com/konapun/pdo-decorator
- Owner: konapun
- Created: 2014-11-26T22:28:37.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2014-12-10T19:54:54.000Z (almost 10 years ago)
- Last Synced: 2024-04-14T19:58:15.936Z (7 months ago)
- Language: PHP
- Size: 137 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PDO Decorator
A decorator interface for PDO and some basic decorators```php
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