1.controller
public function actionIndex()
{
\Yii::$classMap['common\models\shop\ShopSettings'] = '@custom/common/models/shop/ShopSettings.php';
$data = ShopSettings::get('sysset.mall.share');
return $this->success($data);
}
2.CustomShopSettings
namespace common\models\shop;
$classFile= \Yii::getAlias('@common/models/shop/ShopSettings.php');
include $classFile;
/**
* 店铺设置
* Class ShopSettings
* @package common\models\shop
*/
class CustomShopSettings extends ShopSettings
{
}