1
0
mirror of https://github.com/maximebf/php-debugbar.git synced 2025-06-27 05:03:25 +02:00

added new storage adapters

This commit is contained in:
maximebf
2013-09-20 15:46:52 -04:00
parent db4b041fc2
commit 821bf57f2d
6 changed files with 240 additions and 3 deletions

View File

@ -9,11 +9,28 @@ Each time `DebugBar::collect()` is called, the data will be persisted.
## Available storage
Only file storage is provided at the moment. It will collected data as json files
under the specified directory (which as to be writable).
### File
It will collect data as json files under the specified directory
(which has to be writable).
$storage = new DebugBar\Storage\FileStorage($directory);
### Redis
Stores data inside a Redis hash. Uses [Predis](http://github.com/nrk/predis).
$storage = new DebugBar\Storage\RedisStorage($client);
### PDO
Stores data inside a database.
$storage = new DebugBar\Storage\PdoStorage($pdo);
The table name can be changed using the second argument and sql queries
can be changed using `setSqlQueries()`.
## Creating your own storage
You can easily create your own storage handler by implementing the