0 follower

Final Class Yiisoft\Rbac\RuleContext

InheritanceYiisoft\Rbac\RuleContext

Method Details

Hide inherited methods

__construct() public method

public mixed __construct ( Yiisoft\Rbac\RuleFactoryInterface $ruleFactory, array $parameters )
$ruleFactory Yiisoft\Rbac\RuleFactoryInterface
$parameters array

                public function __construct(
    private readonly RuleFactoryInterface $ruleFactory,
    private readonly array $parameters,
) {}

            
createRule() public method

public Yiisoft\Rbac\RuleInterface createRule ( string $name )
$name string

                public function createRule(string $name): RuleInterface
{
    return $this->ruleFactory->create($name);
}

            
getParameterValue() public method

public mixed getParameterValue ( string $name )
$name string

                public function getParameterValue(string $name): mixed
{
    return $this->parameters[$name] ?? null;
}

            
getParameters() public method

public array getParameters ( )

                public function getParameters(): array
{
    return $this->parameters;
}

            
hasParameter() public method

public boolean hasParameter ( string $name )
$name string

                public function hasParameter(string $name): bool
{
    return array_key_exists($name, $this->parameters);
}