Final Class Yiisoft\Rbac\RuleContext
| Inheritance | Yiisoft\Rbac\RuleContext |
|---|
Public Methods
Method Details
| 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,
) {}
| public Yiisoft\Rbac\RuleInterface createRule ( string $name ) | ||
| $name | string | |
public function createRule(string $name): RuleInterface
{
return $this->ruleFactory->create($name);
}
| public mixed getParameterValue ( string $name ) | ||
| $name | string | |
public function getParameterValue(string $name): mixed
{
return $this->parameters[$name] ?? null;
}
| public boolean hasParameter ( string $name ) | ||
| $name | string | |
public function hasParameter(string $name): bool
{
return array_key_exists($name, $this->parameters);
}
Signup or Login in order to comment.