danhanly/scientist-symfony

There is no license information available for the latest version (1.0.0) of this package.

Integrates Scientist into Symfony

1.0.0 2016-02-06 20:28 UTC

This package is not auto-updated.

Last update: 2024-11-01 17:54:36 UTC


README

Scientist

Scientist for Symfony

Packagist Version Packagist

Allow the Scientist library to be used with Symfony.

Installation

Require the latest version of Scientist Symfony using Composer.

composer require danhanly/scientist-symfony

Register the bundle in your AppKernel.

class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = [
            ...
            new DanHanly\ScientistBundle\ScientistBundle()
        ];
        ...
    }
}

Usage

You can access Scientist from any Container Aware Class.

$scientist = $this->container->get('scientist');

From this point, you can use the library as normal within your processes.

$scientist->experiment('my experiment')
    ->control($controlCallback)
    ->trial('trial name', $trialCallback);

$value = $experiment->run();