yii2
1<?php
2/**
3* @link https://www.yiiframework.com/
4* @copyright Copyright (c) 2008 Yii Software LLC
5* @license https://www.yiiframework.com/license/
6*/
7
8namespace yii\rbac;
9
10use yii\base\BaseObject;
11
12/**
13* For more details and usage information on Item, see the [guide article on security authorization](guide:security-authorization).
14*
15* @author Qiang Xue <qiang.xue@gmail.com>
16* @since 2.0
17*/
18class Item extends BaseObject
19{
20const TYPE_ROLE = 1;
21const TYPE_PERMISSION = 2;
22
23/**
24* @var int the type of the item. This should be either [[TYPE_ROLE]] or [[TYPE_PERMISSION]].
25*/
26public $type;
27/**
28* @var string the name of the item. This must be globally unique.
29*/
30public $name;
31/**
32* @var string the item description
33*/
34public $description;
35/**
36* @var string name of the rule associated with this item
37*/
38public $ruleName;
39/**
40* @var mixed the additional data associated with this item
41*/
42public $data;
43/**
44* @var int UNIX timestamp representing the item creation time
45*/
46public $createdAt;
47/**
48* @var int UNIX timestamp representing the item updating time
49*/
50public $updatedAt;
51}
52