Beispiel #1
0
 /**
  * Handles processing the rules data into a usable format
  *
  * @param \GameQ\Buffer $buffer
  *
  * @return mixed
  */
 protected function processRules(Buffer $buffer)
 {
     // Set the result to a new result instance
     $result = new Result();
     // Count the number of rules
     $num_rules = $buffer->readInt16Signed();
     // Add the count of the number of rules this server has
     $result->add('num_rules', $num_rules);
     // Rules
     while ($buffer->getLength()) {
         $result->add($buffer->readString(), $buffer->readString());
     }
     unset($buffer);
     return $result->fetch();
 }