| 12345678910111213141516171819202122232425262728293031323334353637 |
- <?php
- namespace addons\Sicpay\common\services;
- use yii\base\BaseObject;
- class BaseService extends BaseObject
- {
- /**
- * @var string
- */
- public $error = '';
- /**
- * @var int
- */
- public $mall_id;
- public function __construct ($config = [])
- {
- if(empty($config)){
- parent::__construct([]);
- }else{
- foreach ($config as $key => $val) {
- if (property_exists($this, $key)) {
- $this->{$key} = $val;
- }
- }
- }
- }
- public function error($msg):bool {
- $this->error = $msg;
- return false;
- }
- }
|