testRoomPlayer.php 704 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. require_once realpath(dirname(__FILE__)) . '/../common.php';
  3. $objTestRoomPlayer = new RoomPlayer();
  4. $name = 'aben';
  5. $objTestRoomPlayer->getSetRoomId($name);
  6. $roomid = $objTestRoomPlayer->getRoomId($name);
  7. if (!$roomid) {
  8. Eos::log('getRoomId faild');
  9. }
  10. $roomIds = $objTestRoomPlayer->getAllRoomId();
  11. Eos::log('getAllRoomId:');
  12. var_dump($roomIds);
  13. $objTestRoomPlayer->refresh();
  14. //$objTestRoomPlayer->getSetRoomId('player2');
  15. //$objTestRoomPlayer->getSetRoomId('player3');
  16. //$objTestRoomPlayer->getSetRoomId('player4');
  17. //$objTestRoomPlayer->getSetRoomId('player5');
  18. //$objTestRoomPlayer->getSetRoomId('player6');
  19. $players = $objTestRoomPlayer->getPlayers($roomid);
  20. var_dump($players);