BaseProduct.php 1.1 KB

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