Final Class Yiisoft\Rbac\Permission
| Inheritance | Yiisoft\Rbac\Permission » Yiisoft\Rbac\Item |
|---|
Public Methods
Constants
| Constant | Value | Description | Defined By |
|---|---|---|---|
| TYPE_PERMISSION | 'permission' | Yiisoft\Rbac\Item | |
| TYPE_ROLE | 'role' | Yiisoft\Rbac\Item |
Method Details
Defined in: Yiisoft\Rbac\Item::__construct()
| public mixed __construct ( string $name ) | ||
| $name | string |
The name of the item. This must be globally unique. |
final public function __construct(private string $name) {}
Defined in: Yiisoft\Rbac\Item::getAttributes()
| public array getAttributes ( ) | ||
| return | array |
Attribute values indexed by corresponding names. |
|---|---|---|
final public function getAttributes(): array
{
return [
'name' => $this->getName(),
'description' => $this->getDescription(),
'rule_name' => $this->getRuleName(),
'type' => $this->getType(),
'updated_at' => $this->getUpdatedAt(),
'created_at' => $this->getCreatedAt(),
];
}
Defined in: Yiisoft\Rbac\Item::getCreatedAt()
| public integer|null getCreatedAt ( ) |
final public function getCreatedAt(): ?int
{
return $this->createdAt;
}
Defined in: Yiisoft\Rbac\Item::getDescription()
| public string getDescription ( ) |
final public function getDescription(): string
{
return $this->description;
}
Defined in: Yiisoft\Rbac\Item::getName()
| public string getName ( ) | ||
| return | string |
Authorization item name. |
|---|---|---|
final public function getName(): string
{
return $this->name;
}
Defined in: Yiisoft\Rbac\Item::getRuleName()
| public string|null getRuleName ( ) |
final public function getRuleName(): ?string
{
return $this->ruleName;
}
Defined in: Yiisoft\Rbac\Item::getUpdatedAt()
| public integer|null getUpdatedAt ( ) |
final public function getUpdatedAt(): ?int
{
return $this->updatedAt;
}
Defined in: Yiisoft\Rbac\Item::hasCreatedAt()
| public boolean hasCreatedAt ( ) |
final public function hasCreatedAt(): bool
{
return $this->createdAt !== null;
}
Defined in: Yiisoft\Rbac\Item::hasUpdatedAt()
| public boolean hasUpdatedAt ( ) |
final public function hasUpdatedAt(): bool
{
return $this->updatedAt !== null;
}
Defined in: Yiisoft\Rbac\Item::withCreatedAt()
| public Yiisoft\Rbac\Permission withCreatedAt ( integer $createdAt ) | ||
| $createdAt | integer | |
final public function withCreatedAt(int $createdAt): self
{
$new = clone $this;
$new->createdAt = $createdAt;
return $new;
}
Defined in: Yiisoft\Rbac\Item::withDescription()
| public Yiisoft\Rbac\Permission withDescription ( string $description ) | ||
| $description | string | |
final public function withDescription(string $description): self
{
$new = clone $this;
$new->description = $description;
return $new;
}
Defined in: Yiisoft\Rbac\Item::withName()
| public Yiisoft\Rbac\Permission withName ( string $name ) | ||
| $name | string | |
final public function withName(string $name): self
{
$new = clone $this;
$new->name = $name;
return $new;
}
Defined in: Yiisoft\Rbac\Item::withRuleName()
| public Yiisoft\Rbac\Permission withRuleName ( string|null $ruleName ) | ||
| $ruleName | string|null | |
final public function withRuleName(?string $ruleName): self
{
$new = clone $this;
$new->ruleName = $ruleName;
return $new;
}
Defined in: Yiisoft\Rbac\Item::withUpdatedAt()
| public Yiisoft\Rbac\Permission withUpdatedAt ( integer $updatedAt ) | ||
| $updatedAt | integer | |
final public function withUpdatedAt(int $updatedAt): self
{
$new = clone $this;
$new->updatedAt = $updatedAt;
return $new;
}
Signup or Login in order to comment.