2017 © Pedro PelĆ”ez
 

library flipper

image

coduo/flipper

  • Wednesday, April 8, 2015
  • by defrag
  • Repository
  • 2 Watchers
  • 2 Stars
  • 1,593 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 1 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

flipper

Build Status Scrutinizer Code Quality, (*1)

WIP Simple and extensive feature flipper for php. Identifier centric., (*2)

Create a context and register your arguments in context

<?php
use Coduo\Flipper;
use Coduo\Flipper\Feature\Repository\InMemoryFeatureRepository;
use Coduo\Flipper\Activation\Strategy;

$context = new Flipper\Activation\Context('default');
$context2 = new Flipper\Activation\Context('some_dummy_context');
$context->registerArgument(new Flipper\Activation\Argument\UserIdentifier('michal@coduo.pl');
```php

## Set up your feature definitions

$flipper = new Flipper(new InMemoryFeatureRepository());
$flipper->addContext($this->context);

$feature = new Feature('captcha', new Strategy\UserIdentifier(
    new Flipper\Activation\Argument\UserIdentifier('michal@coduo.pl')
]));

$feature2 = new Feature('new_topbar', new Strategy\SystemWide(true));
$flipper->add($feature);
$flipper->add($feature2);

Check it

<?php
$flipper->isActive('captcha', 'default'); #true
$flipper->isActive('captcha', 'Argument'); #false

require: {
   "coduo/flipper": "dev-master"
}

The Versions

08/04 2015

dev-master

9999999-dev

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

by Norbert Orzechowicz

php humanize humanizer

14/12 2014

dev-proposing-argument-resolving

dev-proposing-argument-resolving

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

by Norbert Orzechowicz

php humanize humanizer

25/10 2014

dev-env-strategy-and-changes

dev-env-strategy-and-changes

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

by Norbert Orzechowicz

php humanize humanizer