Authority\Rule::__construct PHP Method

__construct() public method

Rule constructor
public __construct ( boolean $behavior, string $action, string | mixed $resource, Closure | null $condition = null )
$behavior boolean Determines if privilege or restriction
$action string Action the rule applies to
$resource string | mixed Name of resource or instance of object
$condition Closure | null Optional closure to act as a condition
    public function __construct($behavior, $action, $resource, $condition = null)
    {
        $this->setBehavior($behavior);
        $this->setAction($action);
        $this->setResource($resource);
        $this->addCondition($condition);
    }