protected function processAll(Buffer $buffer)
    {
        // Set the result to a new result instance
        $result = new Result();

        // Always dedicated
        $result->add('dedicated', 1);

        $result->add('version', $buffer->readString());
        $result->add('hostname', $buffer->readString());
        $result->add('map', $buffer->readString());
        $result->add('game_descr', $buffer->readString());
        $result->add('flags', $buffer->readString()); // not sure about that
        $result->add('num_players', $buffer->readString());
        $result->add('maxplayers', $buffer->readString());
        $result->add('num_players_total', $buffer->readString());
        $result->add('maxplayers_total', $buffer->readString());

        // Players
        while ($buffer->getLength()) {
            $result->addPlayer('name', $buffer->readString());
            $result->addPlayer('clan', $buffer->readString());
            $result->addPlayer('flag', $buffer->readString());
            $result->addPlayer('score', $buffer->readString());
            $result->addPlayer('team', $buffer->readString());
        }

        unset($buffer);

        return $result->fetch();
    }
protected function processAll(Buffer $buffer)
    {
        // Set the result to a new result instance
        $result = new Result();

        // Always dedicated
        $result->add('dedicated', 1);

        $result->add('version', $buffer->readString());
        $result->add('hostname', $buffer->readString());
        $result->add('map', $buffer->readString());
        $result->add('game_descr', $buffer->readString());
        $result->add('flags', $buffer->readString()); // not sure about that
        $result->add('num_players', $buffer->readString());
        $result->add('maxplayers', $buffer->readString());
        $result->add('num_players_total', $buffer->readString());
        $result->add('maxplayers_total', $buffer->readString());

        // Players
        while ($buffer->getLength()) {
            $result->addPlayer('name', $buffer->readString());
            $result->addPlayer('clan', $buffer->readString());
            $result->addPlayer('flag', $buffer->readString());
            $result->addPlayer('score', $buffer->readString());
            $result->addPlayer('team', $buffer->readString());
        }

        unset($buffer);

        return $result->fetch();
    }
protected function processAll ( Buffer $ buffer ) { // Set the result to a new result instance $ result = new Result ( ) ; // Always dedicated $ result -> add ( 'dedicated' , 1 ) ; $ result -> add ( 'version' , $ buffer -> readString ( ) ) ; $ result -> add ( 'hostname' , $ buffer -> readString ( ) ) ; $ result -> add ( 'map' , $ buffer -> readString ( ) ) ; $ result -> add ( 'game_descr' , $ buffer -> readString ( ) ) ; $ result -> add ( 'flags' , $ buffer -> readString ( ) ) ; // not sure about that $ result -> add ( 'num_players' , $ buffer -> readString ( ) ) ; $ result -> add ( 'maxplayers' , $ buffer -> readString ( ) ) ; $ result -> add ( 'num_players_total' , $ buffer -> readString ( ) ) ; $ result -> add ( 'maxplayers_total' , $ buffer -> readString ( ) ) ; // Players while ( $ buffer -> getLength ( ) ) { $ result -> addPlayer ( 'name' , $ buffer -> readString ( ) ) ; $ result -> addPlayer ( 'clan' , $ buffer -> readString ( ) ) ; $ result -> addPlayer ( 'flag' , $ buffer -> readString ( ) ) ; $ result -> addPlayer ( 'score' , $ buffer -> readString ( ) ) ; $ result -> addPlayer ( 'team' , $ buffer -> readString ( ) ) ; } unset ( $ buffer ) ; return $ result -> fetch ( ) ; }
Handle processing all of the data returned

@param Buffer $buffer

@return array
Handle processing all of the data returned