You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

BaseProduct.php 1.0KB

2 years ago
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?php
  2. namespace crmeb\basic;
  3. use crmeb\services\AccessTokenServeService;
  4. /**
  5. * Class BaseProduct
  6. */
  7. abstract class BaseProduct extends BaseStorage
  8. {
  9. /**
  10. * access_token
  11. * @var null
  12. */
  13. protected $accessToken = NULL;
  14. /**
  15. * BaseProduct constructor.
  16. * @param string $name
  17. * @param AccessTokenServeService $accessTokenServeService
  18. * @param string $configFile
  19. */
  20. public function __construct(string $name, AccessTokenServeService $accessTokenServeService, string $configFile)
  21. {
  22. parent::__construct($name, [], $configFile);
  23. $this->accessToken = $accessTokenServeService;
  24. }
  25. /**
  26. * 初始化
  27. * @param array $config
  28. * @return mixed|void
  29. */
  30. protected function initialize(array $config = [])
  31. {
  32. // parent::initialize($config);
  33. }
  34. /**
  35. * 开通服务
  36. * @return mixed
  37. */
  38. abstract public function open();
  39. /**复制商品
  40. * @return mixed
  41. */
  42. abstract public function goods(string $url);
  43. }