BaseProduct.php 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2016~2020 https://www.crmeb.com All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  8. // +----------------------------------------------------------------------
  9. // | Author: CRMEB Team <admin@crmeb.com>
  10. // +----------------------------------------------------------------------
  11. namespace crmeb\basic;
  12. use crmeb\services\AccessTokenServeService;
  13. /**
  14. * Class BaseProduct
  15. * @package crmeb\basic
  16. */
  17. abstract class BaseProduct extends BaseStorage
  18. {
  19. /**
  20. * access_token
  21. * @var null
  22. */
  23. protected $accessToken = NULL;
  24. /**
  25. * BaseProduct constructor.
  26. * @param string $name
  27. * @param AccessTokenServeService $accessTokenServeService
  28. * @param string $configFile
  29. */
  30. public function __construct(string $name, AccessTokenServeService $accessTokenServeService, string $configFile)
  31. {
  32. parent::__construct($name, [], $configFile);
  33. $this->accessToken = $accessTokenServeService;
  34. }
  35. /**
  36. * 初始化
  37. * @param array $config
  38. * @return mixed|void
  39. */
  40. protected function initialize(array $config = [])
  41. {
  42. // parent::initialize($config);
  43. }
  44. /**
  45. * 开通服务
  46. * @return mixed
  47. */
  48. abstract public function open();
  49. /**复制商品
  50. * @return mixed
  51. */
  52. abstract public function goods(string $url);
  53. }