Item.php 1.06 KB
Newer Older
1 2 3 4 5 6 7
<?php
/**
 * @link http://www.yiiframework.com/
 * @copyright Copyright (c) 2008 Yii Software LLC
 * @license http://www.yiiframework.com/license/
 */

8
namespace yii\rbac;
9 10 11 12 13 14 15

use yii\base\Object;

/**
 * @author Qiang Xue <qiang.xue@gmail.com>
 * @since 2.0
 */
16
class Item extends Object
17
{
18 19
    const TYPE_ROLE = 1;
    const TYPE_PERMISSION = 2;
20 21

    /**
22
     * @var integer the type of the item. This should be either [[TYPE_ROLE]] or [[TYPE_PERMISSION]].
23
     */
24 25 26 27 28
    public $type;
    /**
     * @var string the name of the item. This must be globally unique.
     */
    public $name;
29 30 31 32 33
    /**
     * @var string the item description
     */
    public $description;
    /**
34
     * @var string name of the rule associated with this item
35
     */
36
    public $ruleName;
37 38 39 40 41
    /**
     * @var mixed the additional data associated with this item
     */
    public $data;
    /**
42
     * @var integer UNIX timestamp representing the item creation time
43
     */
44
    public $createdAt;
45
    /**
46
     * @var integer UNIX timestamp representing the item updating time
47
     */
48
    public $updatedAt;
49
}