<?php
/**
* @package OpenCart
* @author Daniel Kerr
* @copyright Copyright (c) 2005 - 2017, OpenCart, Ltd. (https://www.opencart.com/)
* @license https://opensource.org/licenses/GPL-3.0
* @link https://www.opencart.com
*/
/**
* 模型类
*/
abstract class Model {
// 注册实例
protected $registry;
// 构造方法
public function __construct($registry) {
$this->registry = $registry;
}
// 获取模型类实例
public function __get($key) {
return $this->registry->get($key);
}
// 设置模型类实例
public function __set($key, $value) {
$this->registry->set($key, $value);
}
}
【opencart3源码分析】模型类mode.php
猜你喜欢
转载自blog.csdn.net/qq2942713658/article/details/81351301
今日推荐
周排行