mirror of
https://gitee.com/hzchunfen/erp.git
synced 2025-11-30 22:20:45 +00:00
32 lines
589 B
PHP
32 lines
589 B
PHP
<?php
|
|
|
|
namespace App\Services\Business;
|
|
|
|
use App\Services\Business\KuaiTuanTuan\KuaiTuanTuan;
|
|
use App\Services\Business\MiaoXuan\MiaoXuan;
|
|
|
|
class BusinessFactory
|
|
{
|
|
private $platList;
|
|
|
|
public function __construct()
|
|
{
|
|
$this->platList['快团团'] = KuaiTuanTuan::class;
|
|
$this->platList['妙选'] = MiaoXuan::class;
|
|
}
|
|
|
|
/**
|
|
* @param $platName
|
|
* @return BusinessClient
|
|
*/
|
|
public function make($platName)
|
|
{
|
|
return new $this->platList[$platName];
|
|
}
|
|
|
|
public static function init()
|
|
{
|
|
return new self();
|
|
}
|
|
}
|