Material.php 843 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. /*
  3. * This file is part of the overtrue/wechat.
  4. *
  5. * (c) overtrue <i@overtrue.me>
  6. *
  7. * This source file is subject to the MIT license that is bundled
  8. * with this source code in the file LICENSE.
  9. */
  10. /**
  11. * Material.php.
  12. *
  13. * @author overtrue <i@overtrue.me>
  14. * @copyright 2015 overtrue <i@overtrue.me>
  15. *
  16. * @see https://github.com/overtrue
  17. * @see http://overtrue.me
  18. */
  19. namespace EasyWeChat\Message;
  20. /**
  21. * Class Material.
  22. */
  23. class Material extends AbstractMessage
  24. {
  25. /**
  26. * Properties.
  27. *
  28. * @var array
  29. */
  30. protected $properties = ['media_id'];
  31. /**
  32. * Material constructor.
  33. *
  34. * @param string $mediaId
  35. * @param string $type
  36. */
  37. public function __construct($type, $mediaId)
  38. {
  39. $this->set('media_id', $mediaId);
  40. $this->type = $type;
  41. }
  42. }