protected function processPlayers(Buffer $buffer)
    {

        // Decode into items
        $items = $this->decode($buffer);

        // Set the result to a new result instance
        $result = new Result();

        // Number of data points per player
        $numTags = $items[1];

        // Grab the tags for each player
        $tags = array_slice($items, 2, $numTags);

        // Get the player count
        $playerCount = $items[$numTags + 2];

        // Iterate over the index until we run out of players
        for ($i = 0, $x = $numTags + 3; $i < $playerCount; $i++, $x += $numTags) {
            // Loop over the player tags and extract the info for that tag
            foreach ($tags as $index => $tag) {
                $result->addPlayer($tag, $items[($x + $index)]);
            }
        }

        return $result->fetch();
    }
protected function processPlayers(Buffer $buffer)
    {

        // Decode into items
        $items = $this->decode($buffer);

        // Set the result to a new result instance
        $result = new Result();

        // Number of data points per player
        $numTags = $items[1];

        // Grab the tags for each player
        $tags = array_slice($items, 2, $numTags);

        // Get the player count
        $playerCount = $items[$numTags + 2];

        // Iterate over the index until we run out of players
        for ($i = 0, $x = $numTags + 3; $i < $playerCount; $i++, $x += $numTags) {
            // Loop over the player tags and extract the info for that tag
            foreach ($tags as $index => $tag) {
                $result->addPlayer($tag, $items[($x + $index)]);
            }
        }

        return $result->fetch();
    }
protected function processPlayers ( Buffer $ buffer ) { // Decode into items $ items = $ this -> decode ( $ buffer ) ; // Set the result to a new result instance $ result = new Result ( ) ; // Number of data points per player $ numTags = $ items [ 1 ] ; // Grab the tags for each player $ tags = array_slice ( $ items , 2 , $ numTags ) ; // Get the player count $ playerCount = $ items [ $ numTags + 2 ] ; // Iterate over the index until we run out of players for ( $ i = 0 , $ x = $ numTags + 3 ; $ i < $ playerCount ; $ i ++ , $ x += $ numTags ) { // Loop over the player tags and extract the info for that tag foreach ( $ tags as $ index => $ tag ) { $ result -> addPlayer ( $ tag , $ items [ ( $ x + $ index ) ] ) ; } } return $ result -> fetch ( ) ; }
Process the players

@param \GameQ\Buffer $buffer

@return array
Process the players