PrinterService.php 1001 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <?php
  2. namespace ln\services;
  3. use ln\services\printer\AccessToken;
  4. use ln\basic\BaseStorage;
  5. /**
  6. * Class BasePrinter
  7. * @package ln\basic
  8. */
  9. abstract class PrinterService extends BaseStorage
  10. {
  11. /**
  12. * token句柄
  13. * @var AccessToken
  14. */
  15. protected $accessToken;
  16. /**
  17. * 打印内容
  18. * @var string
  19. */
  20. protected $printerContent;
  21. /**
  22. * BasePrinter constructor.
  23. * @param string $name
  24. * @param AccessToken $accessToken
  25. * @param string $configFile
  26. */
  27. public function __construct(string $name, AccessToken $accessToken, string $configFile)
  28. {
  29. $this->accessToken = $accessToken;
  30. $this->initialize([]);
  31. }
  32. /**
  33. * 开始打印
  34. * @param array|null $systemConfig
  35. * @return mixed
  36. */
  37. abstract public function startPrinter();
  38. /**
  39. * 设置打印内容
  40. * @param array $config
  41. * @return mixed
  42. */
  43. abstract public function setPrinterContent(array $config);
  44. }