skeetr/silex

This is a Skeetr implementation for Silex-based apps.

dev-master 2013-04-10 22:36 UTC

This package is not auto-updated.

Last update: 2024-12-17 04:26:51 UTC


README

This is a Skeetr implementation for Silex-based apps.

Requirements

  • PHP 5.3.23
  • Unix system
  • silex/silex
  • skeetr/skeetr

Installation

The recommended way to install Skeetr/Silex is through composer. You can see package information on Packagist.

{
    "require": {
        "skeetr/silex": "dev-master"
    }
}

Parameters

  • skeetr.host (string) Gearman server hostname
  • skeetr.port (integer) Gearman server port
  • skeetr.worker (object) Skeetr\Gearman\Worker instance
  • skeetr.client (object) Skeetr\Client instance

Usage

At your Silex project create the file web/worker.php

$app = new Silex\Application();

/* the register startup calls and config */

$app->register(new Skeetr\Silex\SkeetrServiceProvider())


$app['skeetr.host'] = '127.0.0.1';
$app['skeetr.port'] = 4730;

$app['skeetr.client']->work();

Now you can run the skeetr worker

php web/worker.php

Tests

Tests are in the tests folder. To run them, you need PHPUnit. Example:

$ phpunit --configuration phpunit.xml.dist

License

MIT, see LICENSE