Exemplo n.º 1
0
    $objectFilterRQuery = new RQuery('rule');
    $res = $objectFilterRQuery->parseFromString($rulesFilter, $errorMessage);
    if ($res === false) {
        fwrite(STDERR, "\n\n**ERROR** Rule filter parser: " . $errorMessage . "\n\n");
        exit(1);
    }
    print " - Rule filter after sanitization: ";
    $objectFilterRQuery->display();
    print "\n";
}
// --------------------
//
// load the config
//
print " - Loading configuration through PAN-Configurator library... ";
$pan->load_from_domxml($xmlDoc);
print "OK!\n";
// --------------------
//
// Location Filter Processing
//
// <editor-fold desc="Location Filter Processing" defaultstate="collapsed" >
/**@var RuleStore[] $ruleStoresToProcess */
$rulesLocation = explode(',', $rulesLocation);
foreach ($rulesLocation as &$location) {
    if (strtolower($location) == 'shared') {
        $location = 'shared';
    } else {
        if (strtolower($location) == 'any') {
            $location = 'any';
        } else {