PHP code example of sursum-git / genesis-multilog
1. Go to this page and download the library: Download sursum-git/genesis-multilog library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
sursum-git / genesis-multilog example snippets
use Genesis\RegraNegocio\FluxoRegraNegocio;
$flow = new FluxoRegraNegocio();
$flow->addRuleScript('rules/validar_idade.php');
$flow->addRuleScript([
'script' => 'rules/validar_score.php',
'if' => ['idade' => ['>=' => 25]],
'else_script' => 'rules/negado_score.php'
]);
$flow->setParams(['idade' => 22, 'score' => 500]);
$flow->execute();
print_r($flow->getResult());