junker / handlersocket-service-provider
HandlerSocket Service Provider for Silex
0.2.1
2021-01-06 05:39 UTC
Requires
- junker/hsal: ^0.2.1
- silex/silex: ~2.0
This package is auto-updated.
Last update: 2024-12-06 14:14:45 UTC
README
HandlerSocket Service Provider for Silex
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]);