【php开源代码栏目提醒】:网学会员在php开源代码频道为大家收集整理了DaoAuthentictionProvider.class.php提供大家参考,希望对大家有所帮助!
<?php
// +----------------------------------------------------------------------
// | ThinkPHP
// +----------------------------------------------------------------------
// | Copyright (c) 2008 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
// $Id$
/**
+------------------------------------------------------------------------------
* 濮旀墭鏁版嵁搴撶殑Dao瀵硅薄楠岃瘉鐢ㄦ埛淇℃伅
+------------------------------------------------------------------------------
* @category ORG
* @package ORG
* @subpackage RBAC
* @author liu21st <liu21st@gmail.com>
* @version $Id$
+------------------------------------------------------------------------------
*/
class DaoAuthentictionProvider extends ProviderManager
{//绫诲畾涔夊紑濮?
/**
+----------------------------------------------------------
* 鏁版嵁搴撹璇佺殑琛ㄥ悕
+----------------------------------------------------------
* @var integer
* @access protected
+----------------------------------------------------------
*/
protected $authTable;
/**
+----------------------------------------------------------
* 鏁版嵁搴撹〃涓婚敭鍚?
+----------------------------------------------------------
* @var integer
* @access protected
+----------------------------------------------------------
*/
protected $pk = 'id';
/**
+----------------------------------------------------------
* 鏁版嵁搴撹〃涓婚敭鍚?
+----------------------------------------------------------
* @var integer
* @access protected
+----------------------------------------------------------
*/
protected $authType = array();
/**
+----------------------------------------------------------
* 鏋舵瀯鍑芥暟
+----------------------------------------------------------
* @static
* @access public
+----------------------------------------------------------
*/
public function authenticate($map,$daoClass='User')
{
$dao = D($daoClass);
$result = $dao->find($map);
if($result) {
$this->data = $result;
return true;
}else {
return false;
}
}
}//绫诲畾涔夌粨鏉?
?>
上一篇:
danish-utf-8.inc.php
下一篇:
关于听觉掩蔽的语音增强算法及DSP实现