Download the PHP package researchsquare/exposure without Composer

On this page you can find all versions of the php package researchsquare/exposure. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package exposure

Exposure

Research Square's Exposure library provides basic feature flagging capabilities, allowing you to selectively expose new features to a subset of your users. This library was inspired by Etsy's Feature API.

This library is very much in its early stages of development and could change dramatically in the future, though we hope to keep the public API fairly stable.

At present, features can be completely enabled or disabled, enabled for specific users, or enabled for a percentage of users, allowing gradual availability of new features.

Regardless of the method chosen, feature checks are performed with:

Installation

Install the latest version with:

Integration

To use Exposure in your application, you will need to initialize it with your desired set of features and set the context under which it is operating. How this happens is largely an exercise for you to figure out, but features will typically be defined in your configuration, and Feature and its Context will be initialized during the bootstrapping of your application.

Configuration

An enabled feature

$configuration['feature-name'] = true;

A disabled feature

$configuration['feature-name'] = false;

A feature enabled for specific users

$configuration['feature-name'] = array(
    Exposure\Feature::USER => array(25, 26),
);

A feature enabled for 50% of users

$configuration['feature-name'] = array(
    Exposure\Feature::PERCENTAGE => 50,
);

Rules can be combined, as well.

A feature enabled for specific users or 50% of users

$configuration['feature-name'] = array(
    Exposure\Feature::USER => array(25, 26),
    Exposure\Feature::PERCENTAGE => 50,
);

Establishing context

Feature relies on Context to determine whether a feature is enabled. Context provides information about your application environment, such as the current user. Because establishing context will vary from application to application, it's up to the individual application to define. At present, context provides two pieces of information: the current user's identity and bucketing identity. Bucketing identity is used to identify a user regardless of whether they are anonymous or authenticated, and should remain unchanged throughout that process. This ensures feature availability is consistent for a given user. One method of ensuring this consistency is to store the bucketing identity in a cookie, but, again, this is an exercise left up to the application.


All versions of exposure with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package researchsquare/exposure contains the following files

Loading the files please wait ....