danhanly / scientist-symfony
此包的最新版本(1.0.0)没有可用的许可证信息。
将Scientist集成到Symfony中
1.0.0
2016-02-06 20:28 UTC
Requires
- daylerees/scientist: ~1.0
- symfony/dependency-injection: ~2.3|~3.0
- symfony/framework-bundle: ~2.3|~3.0
Requires (Dev)
- symfony/phpunit-bridge: ~2.7|~3.0
This package is not auto-updated.
Last update: 2024-09-20 17:22:11 UTC
README
Symfony的Scientist
允许使用 Scientist库 与 Symfony 一起使用。
安装
使用 Composer 需要Scientist Symfony的最新版本。
composer require danhanly/scientist-symfony
在AppKernel中注册此捆绑包。
class AppKernel extends Kernel { public function registerBundles() { $bundles = [ ... new DanHanly\ScientistBundle\ScientistBundle() ]; ... } }
使用方法
您可以从任何容器感知类访问Scientist。
$scientist = $this->container->get('scientist');
从现在起,您可以在您的进程内正常使用此库。
$scientist->experiment('my experiment') ->control($controlCallback) ->trial('trial name', $trialCallback); $value = $experiment->run();