/HandlerSocketServiceProvider

HandlerSocket Service Provider for Silex

Primary LanguagePHPMIT LicenseMIT

HandlerSocketServiceProvider

HandlerSocket Service Provider for Silex

Latest Stable Version Total Downloads License

Requirements

silex 2.x

Installation

The best way to install HandlerSocketServiceProvider is to use a Composer:

composer require junker/handlersocket-service-provider

Examples

use HSAL\HSAL;
use Junker\Silex\Provider\HandlerSocketServiceProvider;

$app->register(new HandlerSocketServiceProvider(), [
    'hs.options' => [
        'host' => 'localhost',
        'dbname' => 'testdb'
    ]
]);

# or

$app->register(new HandlerSocketServiceProvider(), [
    'hs.options' => [
        'driver' => HSAL::DRIVER_HSPHP,
        'host' => 'localhost',
        'dbname' => 'testdb',
        'port_read' => 9998,
        'port_write' => 9999,
        'timeout' => 5
    ]
]);


$page = $app['hs'] = $hs->fetchAssoc('pages', ['id', 'title'], [HSAL::INDEX_PRIMARY => 5]);

Documentation

HSAL Documentation