public function __construct(array $items) { foreach ($items as $properties) { $player = new Player($properties); $this->items[$player->platform] = $player; } }