Item.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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\BaseObject;
  9. /**
  10. * For more details and usage information on Item, see the [guide article on security authorization](guide:security-authorization).
  11. *
  12. * @author Qiang Xue <qiang.xue@gmail.com>
  13. * @since 2.0
  14. */
  15. class Item extends BaseObject
  16. {
  17. const TYPE_ROLE = 1;
  18. const TYPE_PERMISSION = 2;
  19. /**
  20. * @var int the type of the item. This should be either [[TYPE_ROLE]] or [[TYPE_PERMISSION]].
  21. */
  22. public $type;
  23. /**
  24. * @var string the name of the item. This must be globally unique.
  25. */
  26. public $name;
  27. /**
  28. * @var string the item description
  29. */
  30. public $description;
  31. /**
  32. * @var string name of the rule associated with this item
  33. */
  34. public $ruleName;
  35. /**
  36. * @var mixed the additional data associated with this item
  37. */
  38. public $data;
  39. /**
  40. * @var int UNIX timestamp representing the item creation time
  41. */
  42. public $createdAt;
  43. /**
  44. * @var int UNIX timestamp representing the item updating time
  45. */
  46. public $updatedAt;
  47. }