/** * 单例模式 * @return Contact_Model */ public static function &instance() { if (!isset(self::$instance)) { self::$instance = new Deal_Model(); } return self::$instance; }
public function __construct() { parent::__construct(); $this->model = Deal_Model::instance(); }