WechatProcessor.php 922 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * Author: 芸众商城 www.yunzshop.com
  5. * Date: 24/03/2017
  6. * Time: 18:10
  7. */
  8. namespace app\common\events;
  9. class WechatProcessor extends Event
  10. {
  11. protected $processor;
  12. protected $pluginName;
  13. public $response;
  14. public function __construct($processor, $pluginName, &$response)
  15. {
  16. $this->processor = $processor;
  17. $this->pluginName = $pluginName;
  18. $this->response = &$response;
  19. }
  20. /**
  21. * 获取触发插件名
  22. * @return mixed
  23. */
  24. public function getPluginName()
  25. {
  26. return $this->pluginName;
  27. }
  28. /**
  29. * 获取微信进程对象
  30. * @return mixed
  31. */
  32. public function getProcessor()
  33. {
  34. return $this->processor;
  35. }
  36. /**
  37. * 设置响应数据
  38. * @param $response
  39. */
  40. public function setResponse($response)
  41. {
  42. $this->response = $response;
  43. }
  44. }