Role
API reference › yii › rbac › Role
For more details and usage information on Role, see the guide article on security authorization.
Properties
Section titled “Properties”| Property | Type | Description | Defined by |
|---|---|---|---|
$createdAt | int | UNIX timestamp representing the item creation time Default: null. | Item |
$data | mixed | The additional data associated with this item Default: null. | Item |
$description | string | The item description Default: null. | Item |
$name | string | The name of the item. Default: null. | Item |
$ruleName | string| | Name of the rule associated with this item Default: null. | Item |
$type | int | Default: self::TYPE_ROLE. | Role |
$updatedAt | int | UNIX timestamp representing the item updating time Default: null. | Item |
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
__construct() | Constructor. | yii\ |
__call() | Calls the named method which is not a class method. | yii\ |
__get() | Returns the value of an object property. | yii\ |
__isset() | Checks if a property is set, i.e. defined and not null. | yii\ |
__set() | Sets value of an object property. | yii\ |
__unset() | Sets an object property to null. | yii\ |
canGetProperty() | Returns a value indicating whether a property can be read. | yii\ |
canSetProperty() | Returns a value indicating whether a property can be set. | yii\ |
className() static | Returns the fully qualified name of this class. | yii\ |
hasMethod() | Returns a value indicating whether a method is defined. | yii\ |
hasProperty() | Returns a value indicating whether a property is defined. | yii\ |
init() | Initializes the object. | yii\ |
Constants
Section titled “Constants”| Constant | Value | Description | Defined by |
|---|---|---|---|
TYPE_ROLE | 1 | Item | |
TYPE_PERMISSION | 2 | Item |
Property details
Section titled “Property details”$type
Section titled “$type ”public int $type = self::TYPE_ROLEThis should be either TYPE_ROLE or TYPE_PERMISSION.