Skip to content

gitter-badger/php-dark-launch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dark Launch Codeigniter

A CodeIgniter library to dark launch features

What is dark launching?

Table of contents

Installation

composer require telusdigital/darklaunch 

Usage

Initialize a Dark Launch object:

use TelusDigital\Dark_Launch;

// Dark Launching requires a redis instance to use
$redis = new Redis();
$redis->connection('127.0.0.1');

$params = ['redis' => $redis];
$dark_launch = new Dark_Launch($params);

Tunables:

  • $redis - obj - send a redis instance to it
  • $project - string the name of the project
  • $user - string - the name of the user dark launching
  • $config - array - an array of default dark launch values
// $redis
$redis = new Redis();
$redis->connection('127.0.0.1');


// $config
// this can be from a codeigniter config  
// e.g $this->load->config('dark_launch');
//     $config = $this->config->item('dark_launch_features');
$config = ['feature-1' => ['type' => 'boolean', 'value' => TRUE], 'feature-1' => ['type' => percentage, 'value' => 30]];

// passing params to Dark_Launch constructor
$params = ['redis' => $redis, 'config' => $config, 'user' => 'ben', 'project' => 'my-awesome-project']
$dark_launch = new Dark_Launch($params);

Config

Dark Launch defaults can be one of three types

  1. boolean

  2. time

  3. percentage

Methods

// TODO: write methods

feature_enabled()

Check if a feature is enabled

$this->dark_launch->feature_enabled();

License

MIT

Contributors

TODO

  • Write some tests with behat!

About

A Dark Launching library for PHP

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages