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: 23 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 (about 10 years ago)
- Default Branch: master
- Last Pushed: 2014-12-10T19:54:54.000Z (about 10 years ago)
- Last Synced: 2024-10-16T17:54:34.713Z (2 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