Skip to content
This repository has been archived by the owner on Jun 16, 2022. It is now read-only.

perevoshchikov/predis-command-collector

Repository files navigation

Anper\Predis\CommandCollector

Software License Latest Version on Packagist Build Status

Install

$ composer require anper/predis-command-collector

Usage collector

use Anper\Predis\CommandCollector\Collector;
use function Anper\Predis\CommandCollector\register_collector;

$client = new \Predis\Client(...);

register_collector($client, $collector = new Collector($client));

// redis queries...

foreach($collector->getProfiles() as $profile) {
    echo $profile->getCommandAsString();
}

Usage function

use Anper\Predis\CommandCollector\Profile;

use function Anper\Predis\CommandCollector\register_collector;

$collector = function (Profile $profile) {
    echo $profile->getCommandAsString();
};

register_collector($client, $collector);

Test

$ composer test

Contributing

Please see CONTRIBUTING for details.

License

The MIT License (MIT). Please see License File for more information.

About

PHP Predis command collector.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages