public function __construct(array $info) { if (isset($info['Defense'])) { $defense = []; foreach ($info['Defense'] as $id => $masteryTreeList) { $masteryTreeListDto = new MasteryTreeList($masteryTreeList); $defense[$id] = $masteryTreeListDto; } $info['Defense'] = $defense; } if (isset($info['Offense'])) { $offense = []; foreach ($info['Offense'] as $id => $masteryTreeList) { $masteryTreeListDto = new MasteryTreeList($masteryTreeList); $offense[$id] = $masteryTreeListDto; } $info['Offense'] = $offense; } if (isset($info['Utility'])) { $utility = []; foreach ($info['Utility'] as $id => $masteryTreeList) { $masteryTreeListDto = new MasteryTreeList($masteryTreeList); $utility[$id] = $masteryTreeListDto; } $info['Utility'] = $utility; } parent::__construct($info); }
public function __construct(array $info) { if (isset($info['image'])) { $info['image'] = new Image($info['image']); } parent::__construct($info); }
public function __construct(array $info) { if (isset($info['blocks'])) { $blocks = []; foreach ($info['blocks'] as $key => $block) { $blocks[$key] = new Block($block); } $info['blocks'] = $blocks; } parent::__construct($info); }
/** * @param array $info */ public function __construct(array $info) { foreach ($info as $treeName => $rawTree) { $tree = []; foreach ($rawTree as $id => $masteryTreeList) { $masteryTreeListDto = new MasteryTreeList($masteryTreeList); $tree[$id] = $masteryTreeListDto; } $info[$treeName] = $tree; } parent::__construct($info); }
/** * @param array $info */ public function __construct(array $info) { if (isset($info['gold'])) { $info['gold'] = new Gold($info['gold']); } if (isset($info['image'])) { $info['image'] = new Image($info['image']); } if (isset($info['rune'])) { $info['rune'] = new MetaData($info['rune']); } if (isset($info['stats'])) { $info['stats'] = new BasicDataStats($info['stats']); } parent::__construct($info); }
public function __construct(array $info) { if (isset($info['image'])) { $info['image'] = new Image($info['image']); } if (isset($info['leveltip'])) { $info['leveltip'] = new LevelTip($info['leveltip']); } if (isset($info['vars'])) { $vars = []; foreach ($info['vars'] as $id => $var) { $spellVarDto = new SpellVar($var); $vars[$id] = $spellVarDto; } $info['vars'] = $vars; } parent::__construct($info); }
public function __construct(array $info) { if (isset($info['image'])) { $info['image'] = new Image($info['image']); } if (isset($info['info'])) { $info['info'] = new Info($info['info']); } if (isset($info['passive'])) { $info['passive'] = new Passive($info['passive']); } if (isset($info['recommended'])) { $recommended = []; foreach ($info['recommended'] as $key => $value) { $recommended[$key] = new Recommended($value); } $info['recommended'] = $recommended; } if (isset($info['skins'])) { $skins = []; foreach ($info['skins'] as $key => $skin) { $skins[$key] = new Skin($skin); } $info['skins'] = $skins; } if (isset($info['spells'])) { $spells = []; foreach ($info['spells'] as $key => $spell) { $spells[$key] = new ChampionSpell($spell); } $info['spells'] = $spells; } if (isset($info['stats'])) { $info['stats'] = new Stats($info['stats']); } parent::__construct($info); }
/** * @param array $info */ public function __construct(array $info) { if (isset($info['image'])) { $info['image'] = new Image($info['image']); } if (isset($info['altimages'])) { $altImages = []; foreach ($info['altimages'] as $key => $image) { $altImages[$key] = new Image($image); } $info['altimages'] = $altImages; } if (isset($info['leveltip'])) { $info['leveltip'] = new LevelTip($info['leveltip']); } if (isset($info['vars'])) { $vars = []; foreach ($info['vars'] as $key => $var) { $vars[$key] = new SpellVar($var); } $info['vars'] = $vars; } parent::__construct($info); }
/** * Will attempt to attach any static data to the given dto if * the attach static data flag is set. * * @param AbstractDto $dto * @return AbstractDto */ protected function attachStaticDataToDto(AbstractDto $dto) { if ($this->attachStaticData) { $dto->loadStaticData($this->staticData); } return $dto; }