Download the PHP package jlis/judge without Composer

On this page you can find all versions of the php package jlis/judge. 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 judge

Judge - Judge handles feature and value toggles/flaggings for Laravel.

The easy way to toggle/decide features and values.

Build Status Scrutinizer Code Quality Code Coverage StyleCI SensioLabsInsight Total Downloads

Installation

First, pull in the package through Composer.

And then include the service provider within app/config/app.php.

And, for convenience, add a facade alias to this same file at the bottom:

Copy the package configs to your local config with the publish command:

Feature configuration

The feature configuration is stored in:

A feature is defined as something which is either on or off and should be only used for that kind of toggles. Lets see:

The name of the feature is show_memory_usage and it should return true if the "debug" Voter returns true (it checks whether the debug mode is enabled or not, see DebugVoter.php)

Note that the default value of a feature, if not defined otherwise, is always false.

Feature configuration examples

A simple feature without any filters ( note that the value can also be a string like "true", "on" or "1", it will be converted into a boolean ):

A feature with multiple filters chained in an AND condition:

A feature with multiple filters chained in an OR condition:

A feature with a negated filter:

Value configuration

The value configuration is stored in:

The value however is something which always returns a value (whoa) like a string or number for example:

This name of the value is greeting. It should return "Hello my lady!" if the expression voter return true (assuming the given user is not NULL and it's gender is female). Otherwise it should return "Hello sir.". (Sorry for the gender guessing)

(ExpressionVoter.php uses the Symfony Expression Language to check if the given expression is true)

Value configuration examples

A simple value without any filters :

A value with one filter and a default value:

A value with multiple filters chained in an AND condition and a default value:

Voters

The actual voters can be registered here:

The voters contain the logic to decide whether the given filter should return true or false. This decides if either a feature is on or off or what a value should return regarding to it's config.

Adapters

By default, Judge uses the Laravel config to read the features/values. You can choose between the config, redis and cache adapter.

If you want to add you own adapter, go for it. Just implement the AdapterInterface.

Usage

Within your controllers, you can use this for example...

Or this:

tbd


All versions of judge with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6.0
symfony/expression-language Version ~2.7|~3.0
illuminate/support Version 5.*
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 jlis/judge contains the following files

Loading the files please wait ....