We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 512d4c8 commit e9c9b86Copy full SHA for e9c9b86
README.md
@@ -40,16 +40,15 @@ $worker->onWorkerStart = function () {
40
// Initialize the Enforcer.
41
$enforcer = new Enforcer("path/to/model.conf", "path/to/policy.csv");
42
43
+ $enforcer->setWatcher($watcher);
44
+
45
// Set callback, sets the callback function that the watcher will call,
46
// When the policy in DB has been changed by other instances.
47
// A classic callback is $enforcer->loadPolicy().
48
$watcher->setUpdateCallback(function () use ($enforcer) {
49
echo "Now should reload all policies." . PHP_EOL;
50
$enforcer->loadPolicy();
51
});
-
- $enforcer->setWatcher($watcher);
52
53
};
54
55
Worker::runAll();
0 commit comments