public function loadForMap($mapUid, $nbLaps)
    {
        // Free old records from memory first.
        foreach ($this->records as $record) {
            $record->clearAllReferences(false);
            unset($record);
        }
        foreach ($this->recordsPerPlayer as $record) {
            $record->clearAllReferences(false);
            unset($record);
        }
        RecordTableMap::clearInstancePool();

        // Load them amm new.
        $this->recordsPerPlayer = [];
        $this->positionPerPlayer = [];

        $this->currentMapUid = $mapUid;
        $this->currentNbLaps = $nbLaps;

        $this->records = $this->recordQueryBuilder
            ->getMapRecords($mapUid, $nbLaps, $this->getScoreOrdering(), $this->nbRecords->get());

        $position = 1;
        foreach ($this->records as $record) {
            $this->recordsPerPlayer[$record->getPlayer()->getLogin()] = $record;
            $this->positionPerPlayer[$record->getPlayer()->getLogin()] = $position++;
        }
    }
public function loadForMap($mapUid, $nbLaps)
    {
        // Free old records from memory first.
        foreach ($this->records as $record) {
            $record->clearAllReferences(false);
            unset($record);
        }
        foreach ($this->recordsPerPlayer as $record) {
            $record->clearAllReferences(false);
            unset($record);
        }
        RecordTableMap::clearInstancePool();

        // Load them amm new.
        $this->recordsPerPlayer = [];
        $this->positionPerPlayer = [];

        $this->currentMapUid = $mapUid;
        $this->currentNbLaps = $nbLaps;

        $this->records = $this->recordQueryBuilder
            ->getMapRecords($mapUid, $nbLaps, $this->getScoreOrdering(), $this->nbRecords->get());

        $position = 1;
        foreach ($this->records as $record) {
            $this->recordsPerPlayer[$record->getPlayer()->getLogin()] = $record;
            $this->positionPerPlayer[$record->getPlayer()->getLogin()] = $position++;
        }
    }
public function loadForMap ( $ mapUid , $ nbLaps ) { // Free old records from memory first. foreach ( $ this -> records as $ record ) { $ record -> clearAllReferences ( false ) ; unset ( $ record ) ; } foreach ( $ this -> recordsPerPlayer as $ record ) { $ record -> clearAllReferences ( false ) ; unset ( $ record ) ; } RecordTableMap :: clearInstancePool ( ) ; // Load them amm new. $ this -> recordsPerPlayer = [ ] ; $ this -> positionPerPlayer = [ ] ; $ this -> currentMapUid = $ mapUid ; $ this -> currentNbLaps = $ nbLaps ; $ this -> records = $ this -> recordQueryBuilder -> getMapRecords ( $ mapUid , $ nbLaps , $ this -> getScoreOrdering ( ) , $ this -> nbRecords -> get ( ) ) ; $ position = 1 ; foreach ( $ this -> records as $ record ) { $ this -> recordsPerPlayer [ $ record -> getPlayer ( ) -> getLogin ( ) ] = $ record ; $ this -> positionPerPlayer [ $ record -> getPlayer ( ) -> getLogin ( ) ] = $ position ++ ; } }
Load records for a certain map.

@param string  $mapUid
@param integer $nbLaps
@throws \Propel\Runtime\Exception\PropelException
Load records for a certain map .