UserEvent.php 973 Bytes
Newer Older
Qiang Xue committed
1 2 3 4 5 6 7 8 9 10 11 12
<?php
/**
 * @link http://www.yiiframework.com/
 * @copyright Copyright (c) 2008 Yii Software LLC
 * @license http://www.yiiframework.com/license/
 */

namespace yii\web;

use yii\base\Event;

/**
13
 * This event class is used for Events triggered by the [[User]] class.
Qiang Xue committed
14 15 16 17 18 19 20
 *
 * @author Qiang Xue <qiang.xue@gmail.com>
 * @since 2.0
 */
class UserEvent extends Event
{
	/**
21
	 * @var IdentityInterface the identity object associated with this event
Qiang Xue committed
22 23 24 25 26 27
	 */
	public $identity;
	/**
	 * @var boolean whether the login is cookie-based. This property is only meaningful
	 * for [[User::EVENT_BEFORE_LOGIN]] and [[User::EVENT_AFTER_LOGIN]] events.
	 */
Qiang Xue committed
28
	public $cookieBased;
Qiang Xue committed
29 30 31 32 33
	/**
	 * @var boolean whether the login or logout should proceed.
	 * Event handlers may modify this property to determine whether the login or logout should proceed.
	 * This property is only meaningful for [[User::EVENT_BEFORE_LOGIN]] and [[User::EVENT_BEFORE_LOGOUT]] events.
	 */
Qiang Xue committed
34
	public $isValid = true;
Zander Baldwin committed
35
}