您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

50 行
1.1KB

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