Download the PHP package ipapikas/gatekeeper without Composer
On this page you can find all versions of the php package ipapikas/gatekeeper. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ipapikas/gatekeeper
More information about ipapikas/gatekeeper
Files in ipapikas/gatekeeper
Package gatekeeper
Short Description GateKeeper allows you to hide part of your product and make it active under given circumstances.
License MIT
Informations about the package gatekeeper
GateKeeper
GateKeeper allows you to hide part of your product and make it active under given circumstances.
Installation
You can install the GateKeeper simply by adding the files into your project or using the composer.
Through the composer
Add the following line to your composer.json
file:
Using GateKeeper
Gatekeeper works with gates and with keepers.
Gates are special software doors that should allow the execution flow when they are open and deny (or do something else) when they are closed. They have a name and a set of keepers.
Keepers are a number of conditions on every gate that decide whether the gate will open or close. On this approach, in order for the gate to open, all the keepers must “allow access”.
How To
GateKeeper library consists of two parts, the initialization and the gate check.
The initialization should usually happen when the application starts, so it can be part of the application bootstrap:
Initialization
Gate Check
Create a custom Keeper
You can easily create your own custom keeper that will have its own logic. The logic can include simple conditions like the weather or build more complex logic based on your user profiles or even custom beta tester programs and so on.
Here is an example of how to build a proper keeper: