ServiceRtm.php 543 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. namespace Easemob\Agora;
  3. /**
  4. * @ignore
  5. */
  6. class ServiceRtm extends Service
  7. {
  8. const SERVICE_TYPE = 2;
  9. const PRIVILEGE_LOGIN = 1;
  10. public $userId;
  11. public function __construct($userId = "")
  12. {
  13. parent::__construct(self::SERVICE_TYPE);
  14. $this->userId = $userId;
  15. }
  16. public function pack()
  17. {
  18. return parent::pack() . Util::packString($this->userId);
  19. }
  20. public function unpack(&$data)
  21. {
  22. parent::unpack($data);
  23. $this->userId = Util::unpackString($data);
  24. }
  25. }