コード例 #1
0
ファイル: Connection.php プロジェクト: ketsuekiro/manialive
 /**
  * Returns an object of Structures\Player type containing the infos on the player with the specified login.
  * The structure contains the following fields : Login, NickName, PlayerId, TeamId, IPAddress, DownloadRate, UploadRate,
  * Language, IsSpectator, IsInOfficialMode, a structure named Avatar, an array of structures named Skins, a structure named LadderStats,
  * HoursSinceZoneInscription and OnlineRights (0: nations account, 3: united account).
  * Each structure of the array Skins contains two fields Environnement and a struct PackDesc.
  * Each structure PackDesc, as well as the struct Avatar, contains two fields FileName and Checksum.
  * @param int $compatibility
  * @return Structures\Player
  * @throws InvalidArgumentException
  */
 function getMainServerPlayerInfo($compatibility = 1)
 {
     if (!is_int($compatibility)) {
         throw new InvalidArgumentException('compatibility = ' . print_r($compatibility, true));
     }
     return Structures\Player::fromArray($this->execute(ucfirst(__FUNCTION__), array($compatibility)));
 }