Пример #1
0
 /**
  * @param array $info
  */
 public function __construct(array $info)
 {
     foreach ($info as &$mastery) {
         $mastery = new ChampionMastery($mastery);
     }
     parent::__construct($info);
 }
Пример #2
0
 /**
  * @param array $info
  */
 public function __construct(array $info)
 {
     foreach ($info as &$shard) {
         $shard = new Shard($shard);
     }
     parent::__construct($info);
 }
 /**
  * @param array $info
  */
 public function __construct(array $info)
 {
     if (isset($info['playerStatSummaries'])) {
         $stats = [];
         foreach ($info['playerStatSummaries'] as $key => $playerStat) {
             $playerStats = new PlayerStatsSummary($playerStat);
             $stats[$key] = $playerStats;
         }
         $info['playerStatSummaries'] = $stats;
     }
     parent::__construct($info);
 }
Пример #4
0
 /**
  * @param array $info
  */
 public function __construct(array $info)
 {
     if (isset($info['champions'])) {
         $champions = [];
         foreach ($info['champions'] as $key => $champion) {
             $championStats = new ChampionStats($champion);
             $champions[$key] = $championStats;
         }
         $info['champions'] = $champions;
     }
     parent::__construct($info);
 }
Пример #5
0
 public function __construct(array $info)
 {
     if (isset($info['games'])) {
         $games = [];
         foreach ($info['games'] as $gameId => $game) {
             $gameDto = new Game($game);
             $games[$gameId] = $gameDto;
         }
         $info['games'] = $games;
     }
     parent::__construct($info);
 }
 /**
  * @param array $info
  */
 public function __construct(array $info)
 {
     if (isset($info['gameList'])) {
         $games = [];
         foreach ($info['gameList'] as $game) {
             $gameDto = new CurrentGame($game);
             $games[] = $gameDto;
         }
         $info['gameList'] = $games;
     }
     parent::__construct($info);
 }
Пример #7
0
 public function __construct(array $info)
 {
     if (isset($info['matches'])) {
         $matches = [];
         foreach ($info['matches'] as $key => $value) {
             $matches[$key] = new Match($value);
         }
         $info['matches'] = $matches;
     } else {
         $info['matches'] = array();
     }
     parent::__construct($info);
 }
Пример #8
0
 /**
  * @param array $info
  */
 public function __construct(array $info)
 {
     if (isset($info['champions'])) {
         $champions = [];
         foreach ($info['champions'] as $champion) {
             $championId = intval($champion['id']);
             $championDto = new Champion($champion);
             $champions[$championId] = $championDto;
         }
         $info['champions'] = $champions;
     }
     parent::__construct($info);
 }
Пример #9
0
 public function __construct(array $info)
 {
     if (isset($info['entries'])) {
         $entries = [];
         foreach ($info['entries'] as $key => $entry) {
             $leagueEntry = new LeagueEntry($entry);
             $entries[$key] = $leagueEntry;
         }
         $info['entries'] = $entries;
     }
     $info['playerOrTeamName'] = null;
     parent::__construct($info);
     // get the current team
     if (isset($this->info['id'])) {
         $current = $this->entry($this->info['id']);
         if (!is_null($current)) {
             $this->info['playerOrTeam'] = $current;
         }
     }
 }
Пример #10
0
 /**
  * @param array $info
  */
 public function __construct(array $info)
 {
     if (isset($info['roster'])) {
         $info['roster'] = new Team\Roster($info['roster']);
     }
     if (isset($info['matchHistory'])) {
         $matches = [];
         foreach ($info['matchHistory'] as $matchId => $match) {
             $match = new Team\Match($match);
             $matches[$matchId] = $match;
         }
         $info['matchHistory'] = $matches;
     }
     if (isset($info['teamStatDetails'])) {
         $details = [];
         foreach ($info['teamStatDetails'] as $detail) {
             $details[] = new Stats($detail);
         }
         $info['teamStatDetails'] = $details;
     }
     parent::__construct($info);
 }