2017 © Pedro Peláez
 

library silex-predis

Predis extension for Silex

image

mheap/silex-predis

Predis extension for Silex

  • Wednesday, October 11, 2017
  • by mheap
  • Repository
  • 1 Watchers
  • 2 Stars
  • 305 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 1 % Grown

The README.md

Silex-Memcache

Build Status, (*1)

Requirements

This extension only works with PHP 7.0+ and Silex 2. Version 1.0.0 is compatible with Silex 1., (*2)

Installation

Install with composer:, (*3)

composer require mheap/silex-predis

Usage

Before you can use this extension you need to register it with your application. You specify a server to connect to at this point, as well as any other configuration options, (*4)

$app->register(new SilexPredis\PredisExtension(), array(
    'predis.server'  => array(
        'host' => '127.0.0.1',
        'port' => 6379
    ),
    'predis.config'  => array(
        'prefix' => 'predis__'
    )
));

Once the extension is registered, it'll be available as $app['predis']:, (*5)

$app->get('/', function() use($app) {
    $app['predis']->set('my_value', 'This is an example');
    $value = $app['predis']->get('my_value');
});

Running the tests

You'll need Redis running on port 6379 locally to run the tests. If you don't have Redis installed you can run docker-compose up to run it in a container instead., (*6)

The Versions

11/10 2017

dev-master

9999999-dev https://github.com/mheap/Silex-Predis

Predis extension for Silex

  Sources   Download

MIT

The Requires

 

The Development Requires

silex redis predis

11/10 2017

2.0.0

2.0.0.0 https://github.com/mheap/Silex-Predis

Predis extension for Silex

  Sources   Download

MIT

The Requires

 

The Development Requires

silex redis predis