johnsn/pheanstalk-service-provider

A Pheanstalk service provider for Silex

v2.0.0 2017-05-08 14:08 UTC

This package is not auto-updated.

Last update: 2024-11-23 16:50:35 UTC


README

Simple service provider for pheanstalk, hope you enjoy.

Usage

<?php
    use Silex\Application;
    use PheanstalkServiceProvider\PheanstalkServiceProvider;

    $app = new Application();
    $app->register(new PheanstalkServiceProvider(), [
        'pheanstalk.hostname' => 'localhost',
        'pheanstalk.port' => 11300,
        'pheanstalk.timeout' => null,
    ]);

    $app->run();

Or if you don't want to use this package at all...

<?php
    use Silex\Application;
    use Pheanstalk\Pheanstalk;

    $app = new Application();
    $app['pheanstalk'] = function() {
        return new Pheanstalk('localhost', 11300, null);
    };

    $app->run();

License

PheanstalkServiceProvider is licensed under the new bsd license, see LICENSE.md.