IUserIdentity

CDbHttpSession

Yii Framework v1.1.10 类参考

IUserIdentity

system.base
继承 interface IUserIdentity
子类 CBaseUserIdentity, CUserIdentity
源自 1.0
版本 $Id: interfaces.php 3515 2011-12-28 12:29:24Z mdomba $
源码 framework/base/interfaces.php
IUserIdentity接口是由一个用户验证类实现的。

一个身份, 代表一种方法来验证用户和检索唯一身份用户需要的信息。 它通常用于用户的应用程序组件

公共方法

隐藏继承方法

方法描述定义在
authenticate() 验证用户身份。 IUserIdentity
getId() 返回一个值,该值代表唯一的身份。 IUserIdentity
getIsAuthenticated() 返回一个值,该值表示是否验证身份。 IUserIdentity
getName() 返回标识的显示名称(如用户名)。 IUserIdentity
getPersistentStates() 返回额外的身份信息,需要用在用户会话期间的持久性存储 IUserIdentity

方法详细

authenticate() 方法
abstract public boolean authenticate()
{return} boolean 是否验证成功。
源码: framework/base/interfaces.php#264 (显示)
public function authenticate();

验证用户身份。 来验证用户所需的信息 通常是在构造函数中提供。

getId() 方法
abstract public mixed getId()
{return} mixed 唯一代表身份的一个值(如主键的值)。
源码: framework/base/interfaces.php#274 (显示)
public function getId();

返回一个值,该值代表唯一的身份。

getIsAuthenticated() 方法
abstract public boolean getIsAuthenticated()
{return} boolean 是否是有效的身份。
源码: framework/base/interfaces.php#269 (显示)
public function getIsAuthenticated();

返回一个值,该值表示是否验证身份。

getName() 方法
abstract public string getName()
{return} string 身份的显示名称。
源码: framework/base/interfaces.php#279 (显示)
public function getName();

返回标识的显示名称(如用户名)。

getPersistentStates() 方法
abstract public array getPersistentStates()
{return} array 额外的身份信息,需要在用户会话期间持久存储(不包括 id)。
源码: framework/base/interfaces.php#284 (显示)
public function getPersistentStates();

返回额外的身份信息,需要用在用户会话期间的持久性存储

Copyright © 2008-2011 by Yii Software LLC
All Rights Reserved.