コード例 #1
0
 /**
  * Returns the list of ignored players.
  * @param int $length Maximum number of infos to be returned
  * @param int $offset Starting index in the list
  * @param bool $multicall
  * @return Structures\Player[]
  * @throws InvalidArgumentException
  */
 function getIgnoreList($length = -1, $offset = 0, $multicall = false)
 {
     if (!is_int($length)) {
         throw new InvalidArgumentException('length = ' . print_r($length, true));
     }
     if (!is_int($offset)) {
         throw new InvalidArgumentException('offset = ' . print_r($offset, true));
     }
     if ($multicall) {
         return $this->execute(ucfirst(__FUNCTION__), array($length, $offset), $this->structHandler('Player', true));
     }
     return Structures\Player::fromArrayOfArray($this->execute(ucfirst(__FUNCTION__), array($length, $offset)));
 }
コード例 #2
0
ファイル: Connection.php プロジェクト: ketsuekiro/manialive
 /**
  * Returns the current ranking for the race in progressof the player with the specified login (or list of comma-separated logins).
  * The ranking returned is a list of structures that contains the following fields :
  * Login, NickName, PlayerId, Rank, BestTime, Score, NbrLapsFinished and LadderScore.
  * It also contains an array BestCheckpoints that contains the checkpoint times for the best race.
  * @param Structures\Player|Structures\Player[] $player
  * @throws InvalidArgumentException
  * @return Structures\Player[] The list is an array of Structures\Player.
  */
 function getCurrentRankingForLogin($player = null)
 {
     $login = $this->getLogin($player) ?: '';
     return Structures\Player::fromArrayOfArray($this->execute(ucfirst(__FUNCTION__), array($login)));
 }