Get a players record on a certain map.

@param $mapUid
@param $nbLaps
@param $logins

@return Record[]|\Propel\Runtime\Collection\ObjectCollection
500333
public function getPlayerMapRecords($mapUid, $nbLaps, $logins)
    {
        $query = new RecordQuery();
        $query->filterByMapuid($mapUid);
        $query->filterByNblaps($nbLaps);
        $query->filterByPlayerLogins($logins);

        $result = $query->find();
        $result->populateRelation('Player');
        RecordTableMap::clearInstancePool();

        return $result->getData();
    }
1248081
public function addMapLast(Map $map, $login = null, $force = false)
    {
        return $this->addMap($map, $login, $force, false);
    }
91206
public function openSession($serverlogin, $apikey)
    {
        if ($this->enabled->get() == false) {
            return;
        }

        $this->sessionId = null;
        $server = new Player();
        $server->login = $this->gameDataStorage->getSystemInfo()->serverLogin;

        $info = $this->factory->getConnection()->getDetailedPlayerInfo($server);

        $packMask = $this->getPackMask($this->gameDataStorage->getVersion()->titleId);
        if (!$packMask) {
            throw new \Exception("Packmask not found for titleId");
        }
        $params = [
            "Game" => "TM2",
            "Login" => $serverlogin,
            "Code" => $apikey,
            "Path" => $info->path,
            "Packmask" => $packMask,
            "ServerVersion" => $this->gameDataStorage->getVersion()->version,
            "ServerBuild" => $this->gameDataStorage->getVersion()->build,
            "Tool" => "eXpansion",
            "Version" => AbstractApplication::EXPANSION_VERSION,
            "ServerIp" => $this->gameDataStorage->getSystemInfo()->publishedIp,
        ];

        $request = new Request('dedimania.OpenSession', [$params]);

        $this->sendRequest($request, function ($response) {
            $this->sessionId = $response['SessionId'];
            $this->getRecords();
            $this->connectAllPlayers();
        });
    }
1014785
public List<UserDto> selectByUuids(DbSession session, Collection<String> uuids) {
    return executeLargeInputs(uuids, mapper(session)::selectByUuids);
  }
1239519
public function callbackApply(ManialinkInterface $manialink, $login, $entries, $args)
    {
        /** @var GridBuilder $grid */
        $grid = $manialink->getData('grid');
        $grid->updateDataCollection($entries); // update datacollection

        // build settings array from datacollection
        $settings = [];
        foreach ($grid->getDataCollection()->getAll() as $key => $value) {
            $settings[$value['name']] = $value['value'];
        }

        try {
            $this->factory->getConnection()->setModeScriptSettings($settings);
            $this->closeManialink($manialink);

        } catch (\Exception $ex) {
            // TODO this should use chat notification.
            $this->factory->getConnection()->chatSendServerMessage("error: ".$ex->getMessage());
            $this->console->writeln('$f00Error: $fff'.$ex->getMessage());
        }
    }
340177
public function onPlayerChat($playerUid, $login, $text, $isRegisteredCmd = false)
    {
        // disable for server
        if ($playerUid === 0) {
            return;
        }

        if (!$isRegisteredCmd) {
            return;
        }

        $text = substr($text, 1);
        $cmdAndArgs = explode(' ', $text);

        // Internal dedicated server commands to ignore.
        if ($cmdAndArgs[0] === 'version' || $cmdAndArgs[0] === 'serverlogin') {
            return;
        }

        $message = 'expansion_core.chat_commands.wrong_chat';

        list($command, $parameter) = $this->chatCommands->getChatCommand($cmdAndArgs);

        /** @var AbstractChatCommand $command */
        if ($command) {
            $parameter = implode(" ", $parameter);
            $message = $command->validate($login, $parameter);
            if (empty($message)) {
                try {
                    $this->chatOutput->setLogin($login);
                    $message = $command->run($login, $this->chatOutput, $parameter);
                } catch (PlayerException $e) {
                    // Player exceptions are meant to be sent to players, and not crash or even be logged.
                    $this->chatNotification->sendMessage($e->getTranslatableMessage(), $login);
                } catch (UnknownPlayerException $e) {
                    // Player exceptions are meant to be sent to players, and not crash or even be logged.
                    $this->chatNotification->sendMessage($e->getMessage(), $login);
                }
            }
        }

        if (!empty($message)) {
            $this->chatNotification->sendMessage($message, $login);
        }
    }
1343712
function forcePlayerTeam($player, $team, $multicall = false)
    {
        $login = $this->getLogin($player);
        if ($login === false) {
            throw new InvalidArgumentException('player = ' . print_r($player, true));
        }
        if ($team !== 0 && $team !== 1) {
            throw new InvalidArgumentException('team = ' . print_r($team, true));
        }

        return $this->execute(ucfirst(__FUNCTION__), array($login, $team), $multicall);
    }
39846
public function onPlayerChat($playerUid, $login, $text, $isRegisteredCmd = false)
    {
        if (!$isRegisteredCmd) {
            $this->dispatch(__FUNCTION__, [$this->playerStorage->getPlayerInfo($login), $text]);
        }
    }
452998
protected function getMemcached($connectionId, array $credentials, array $options)
    {
        $memcached = $this->createMemcachedInstance($connectionId);

        if (count($credentials) == 2) {
            $this->setCredentials($memcached, $credentials);
        }

        if (count($options)) {
            $memcached->setOptions($options);
        }

        return $memcached;
    }
384555
public static function selectPlayerListForTeam(
        $statisticState,
        $teamKey
    ) {
        $statisticState = (object) $statisticState;

        $playerList = [];
        foreach ($statisticState->team->$teamKey->player as $playerKey => $playerEnabled) {
            $playerItem = $statisticState->player->$playerKey;
            $playerList[$playerKey] = $playerItem;
        }

        return $playerList;
    }
528583
protected function getNewRecord($login)
    {
        $record = new Record();
        $record->setPlayer($this->playerDb->get($login));
        $record->setNbLaps($this->currentNbLaps);
        $record->setNbFinish(0);
        $record->setMapUid($this->currentMapUid);

        return $record;
    }
118017
function players (resp) {
  return base(resp).map(function (player) {
    var names = player.displayLastCommaFirst.split(", ").reverse();
    return {
      firstName: names[0].trim(),
      lastName: (names[1] ? names[1] : "").trim(),
      playerId: player.personId,
      teamId: player.teamId,
    };
  });
}
944925
public function createForPlayer($login)
    {
        if (!isset($this->groups[$login])) {
            $class = $this->class;
            /** @var Group $group */
            $group = new $class(null, $this->dispatcher);

            $this->groups[$login] = $group;
            $group->addLogin($login);
        }

        return $this->groups[$login];
    }
1276317
public function getUserByLogin(string $login)
    {
        $retval = null;

        if (strlen($login) > 0) {
            $nb_user = CNabuUser::findByLogin($this, $login);
            if ($nb_user instanceof CNabuUser && $nb_user->validateCustomer($this)) {
                $nb_user->setCustomer($this);
                $retval = $nb_user;
            }
        }

        return $retval;
    }
640548
public function getPlayerRecord($login)
    {
        return isset($this->recordsPerPlayer[$login]) ? $this->recordsPerPlayer[$login] : null;
    }
137349
protected function getPage($records, $maxshown, $numpages) {
        $show = floor($numpages / 2);
        if (self::$lastpage > $numpages) {
            self::$page = (self::$current > $show ? (self::$current - $show) : 1);
            if (self::$current < (self::$lastpage - $show)) {
                self::$lastpage = ((self::$current <= $show) ? (self::$current + ($numpages - self::$current)) : (self::$current + $show));
            }
            else { self::$page = self::$current - ($numpages - ((ceil(intval($records) / ($maxshown >= 1 ? intval($maxshown) : 1)) - self::$current)) - 1); }
        }
        else { self::$page = 1; }
    }
568099
public static Collection<INimbusCredentialPlugin> getNimbusAutoCredPlugins(Map conf) {
        try {
            Set<INimbusCredentialPlugin> ret = new HashSet<INimbusCredentialPlugin>();
            Collection<String> clazzes = (Collection<String>) conf.get(Config.NIMBUS_AUTO_CRED_PLUGINS);
            if (clazzes != null) {
                for (String clazz : clazzes) {
                    INimbusCredentialPlugin inst = (INimbusCredentialPlugin) Class.forName(clazz).newInstance();
                    inst.prepare(conf);
                    ret.add(inst);
                }
            }
            return ret;
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }