2017 © Pedro Peláez
 

library rule-engine

Versatile rule engine that allows to apply logic to a given context.

image

linio/rule-engine

Versatile rule engine that allows to apply logic to a given context.

  • Friday, July 20, 2018
  • by linio
  • Repository
  • 2 Watchers
  • 5 Stars
  • 796 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 7 Versions
  • 13 % Grown

The README.md

Linio Rule Engine

Latest Stable Version License Build Status Scrutinizer Code Quality, (*1)

This is a small and versatile rule engine that allows you run conditional logic and predetermined statements on a given context. It has a Parser that targets a very simplistic AST. By default, we have included a Blockly XML parser, but you can add pretty much anything else., (*2)

Install

The recommended way to install Linio Rule Engine is through composer., (*3)

{
    "require": {
        "linio/rule-engine": "^1.0"
    }
}

Tests

To run the test suite, you need install the dependencies via composer, then run PHPUnit., (*4)

$ composer install
$ phpunit

Usage

The RuleEngine interpreter uses a parser to create the AST tree based on a provided string, which is the actual rule source. You can create your own parser or use an existing one, like the BlocklyXmlParser. A context must be an instance of a Dictionary., (*5)

<?php

use Linio\Type\Dictionary;
use Linio\Component\RuleEngine\Interpreter;

$context = new Dictionary(['item' => 11]);
$interpreter = new Interpreter();
$interpreter->setParser(...);
$interpreter->evaluate('rule source', $context);

The Versions

20/07 2018

dev-master

9999999-dev

Versatile rule engine that allows to apply logic to a given context.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

linio rule rule engine

06/07 2018

dev-dependabot/composer/phpunit/phpunit-approx-4.5|approx-7.0

dev-dependabot/composer/phpunit/phpunit-approx-4.5|approx-7.0

Versatile rule engine that allows to apply logic to a given context.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

linio rule rule engine

10/05 2017

0.3.0

0.3.0.0

Versatile rule engine that allows to apply logic to a given context.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

linio rule rule engine

05/05 2016

0.2.0

0.2.0.0

Versatile rule engine that allows to apply logic to a given context.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

linio rule rule engine

05/05 2016

0.1.2

0.1.2.0

Versatile rule engine that allows to apply logic to a given context.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

linio rule rule engine

21/04 2016

0.1.1

0.1.1.0

Versatile rule engine that allows to apply logic to a given context.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

linio rule rule engine

11/08 2015

0.1.0

0.1.0.0

Versatile rule engine that allows to apply logic to a given context.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

linio rule rule engine