2017 © Pedro Peláez
 

symfony-bundle phpredis-bundle

Adds phpredis to symfony.

image

pompdelux/phpredis-bundle

Adds phpredis to symfony.

  • Tuesday, November 11, 2014
  • by mrbase
  • Repository
  • 3 Watchers
  • 0 Stars
  • 2,396 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

PHPRedisBundle

This bundle brings phpredis to your Symfony2 app., (*1)

It allows you to easily create multiple clients pointing to different databases and/or servers., (*2)

Install:

  1. Add PHPRedisBundleBundle to your dependencies:, (*3)

    // composer.json
    {
        // ...
        "require": {
            // ...
            "pompdelux/phpredis-bundle": "1.*"
        }
    }
  2. Use Composer to download and install the bundle:, (*4)

    $ php composer.phar update pompdelux/phpredis-bundle
  3. Register the bundle in your application:, (*5)

    // app/AppKernel.php
    class AppKernel extends Kernel
    {
        // ...
        public function registerBundles()
        {
            $bundles = array(
                // ...
                new Pompdelux\PHPRedisBundle\PHPRedisBundle(),
            );
        }
    }
  4. Add the configuration needed to use the bundle:, (*6)

    // config.yml
    php_redis:
        class:
            service_name:
                host:     127.0.0.1
                port:     6379
                prefix:   ''
                database: 0
                timeout:  0
                auth:     null
                skip_env: false
            some_other_service:
                host:      localhost
                port:      6379
                ....

Two things to note:, (*7)

  1. If skip_env is not set to false the environment will be part of the prefix for all keys.
  2. Redis::SERIALIZER_PHP will be used as serializer unless you override it via setOption()

Usage:

$redis = $this->container->get('pdl.phpredis.service_name');
$redis->set('key', 'value');
echo $redis->get('key');

The Versions

11/11 2014

dev-master

9999999-dev https://github.com/pompdelux/phpredis-bundle

Adds phpredis to symfony.

  Sources   Download

MIT

The Requires

  • php >=5.5
  • ext-redis 2.2.x

 

redis symfony phpredis

11/11 2014

1.0.2

1.0.2.0 https://github.com/pompdelux/phpredis-bundle

Adds phpredis to symfony.

  Sources   Download

MIT

The Requires

  • php >=5.5
  • ext-redis 2.2.x

 

redis symfony phpredis

06/08 2014

1.0.1

1.0.1.0 https://github.com/pompdelux/phpredis-bundle

Adds phpredis to symfony.

  Sources   Download

MIT

The Requires

  • php >=5.5
  • ext-redis 2.2.x

 

redis symfony phpredis

30/06 2014

1.0.0

1.0.0.0 https://github.com/pompdelux/phpredis-bundle

Adds phpredis to symfony.

  Sources   Download

MIT

The Requires

  • php >=5.5
  • ext-redis 2.2.x

 

redis symfony phpredis