You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

преди 8 години
12345678910111213141516171819202122232425262728293031323334353637383940
  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\web;
  8. use yii\base\Event;
  9. /**
  10. * This event class is used for Events triggered by the [[User]] class.
  11. *
  12. * @author Qiang Xue <qiang.xue@gmail.com>
  13. * @since 2.0
  14. */
  15. class UserEvent extends Event
  16. {
  17. /**
  18. * @var IdentityInterface the identity object associated with this event
  19. */
  20. public $identity;
  21. /**
  22. * @var boolean whether the login is cookie-based. This property is only meaningful
  23. * for [[User::EVENT_BEFORE_LOGIN]] and [[User::EVENT_AFTER_LOGIN]] events.
  24. */
  25. public $cookieBased;
  26. /**
  27. * @var integer $duration number of seconds that the user can remain in logged-in status.
  28. * If 0, it means login till the user closes the browser or the session is manually destroyed.
  29. */
  30. public $duration;
  31. /**
  32. * @var boolean whether the login or logout should proceed.
  33. * Event handlers may modify this property to determine whether the login or logout should proceed.
  34. * This property is only meaningful for [[User::EVENT_BEFORE_LOGIN]] and [[User::EVENT_BEFORE_LOGOUT]] events.
  35. */
  36. public $isValid = true;
  37. }