CoreFiles by mySites.guru
storage.md45 lines, 1,328 bytes, from Joomla_4.1.3-Stable-Full_Package.zip
Raw History Compare with 4.1.2
md5
09a7bfcdcce2b9897912973396c9bd8f
sha1
b8883d76b3390d463b1f088619a0bbcc3adef26e
sha256
05107ab9be9b5a1ecd8c5100c6e92e7fe6070c1421c4b4d4bde068df1151fef7
# Storage

DebugBar supports storing collected data for later analysis.
You'll need to set a storage handler using `setStorage()` on your `DebugBar` instance.

    $debugbar->setStorage(new DebugBar\Storage\FileStorage('/path/to/dir'));

Each time `DebugBar::collect()` is called, the data will be persisted.

## Available storage

### 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
`DebugBar\Storage\StorageInterface`.

## Request ID generator

For each request, the debug bar will generate a unique id under which to store the
collected data. This is perform using a `DebugBar\RequestIdGeneratorInterface` object.

If none are defined, the debug bar will automatically use `DebugBar\RequestIdGenerator`
which uses the `$_SERVER` array to generate the id.

The same content is in 3 releases, Joomla 4.1.3-rc1 to 4.1.4-rc1. See them all, or every version of this file.