【php开源代码栏目提醒】:网学会员为需要php开源代码的朋友们搜集整理了Base.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$
/**
+------------------------------------------------------------------------------
* Think
PHP绯荤粺鍩虹被 鎶借薄绫?
+------------------------------------------------------------------------------
* @category Think
* @package Think
* @subpackage Core
* @author liu21st <liu21st@gmail.com>
* @version $Id$
+------------------------------------------------------------------------------
*/
abstract class Base
{
/**
+----------------------------------------------------------
* 鑷姩鍙橀噺璁剧疆
+----------------------------------------------------------
* @access public
+----------------------------------------------------------
* @param $name 灞炴у悕绉?
* @param $value 灞炴у?
+----------------------------------------------------------
*/
private function __set($name ,$value)
{
if(property_exists($this,$name)){
$this->$name = $value;
}
}
/**
+----------------------------------------------------------
* 鑷姩鍙橀噺鑾峰彇
+----------------------------------------------------------
* @access public
+----------------------------------------------------------
* @param $name 灞炴у悕绉?
+----------------------------------------------------------
* @return mixed
+----------------------------------------------------------
*/
private function __get($name)
{
if(isset($this->$name)){
return $this->$name;
}else {
return null;
}
}
}//绫诲畾涔夌粨鏉?
?>