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