hoaproject/Ruler — pull request #13 by ncosmin2001 (2014-03-24 13:53:38+00:00)
Title: Adding possibility to return context keys for dynamically populate context.

In my case, I want to be able to populate my context dynamically so i've added this possibility.
The code will look something like this:
$ruler = new \Hoa\Ruler\Ruler();

$rule = 'group in ("customer", "guest") and points > 30';

$rule = \Hoa\Ruler\Ruler::interprete($rule);
$contextKeys = $ruler->getContextKeys();

//dynamically populate context based on context keys
$context = getContext (new \Hoa\Ruler\Context(), $contextKeys);

var_dump($ruler->assert($rule, $context));