protected function getTeam($t)
    {
        $teamInfo = (array)$t;
        $team = new Team();
        $fields = array_keys($teamInfo);
        foreach ($fields as $field) {
            // I hope, that API-response will be changed and players_ids, leagues_ids will become arrays
            if (preg_match('/^player_\d+_account_id$/', $field)) {
                $team->addPlayerId($teamInfo[$field]);
                continue;
            }
            if (preg_match('/^league_id_\d+$/', $field)) {
                $team->addLeagueId($teamInfo[$field]);
                continue;
            }
            $team->set($field, (string)$teamInfo[$field]);
        }
        return $team;
    }