Net_GameServerQuery
[ class tree: Net_GameServerQuery ] [ index: Net_GameServerQuery ] [ all elements ]

Class: Net_GameServerQuery_Protocol

Source Location: /Net_GameServerQuery-0.2.0/GameServerQuery/Protocol.php

Class Overview


Abstract class which all protocol classes must inherit


Author(s):

Version:

  • $Revision: 1.29 $

Variables

Methods


Child classes:

Inherited Variables

Inherited Methods


Class Details

[line 46]
Abstract class which all protocol classes must inherit


[ Top ]


Class Variables

$_output =

[line 70]

Formatted server response
  • Access: protected

Type:   array


[ Top ]

$_player_index =

[line 78]

Highest player index
  • Access: protected

Type:   int


[ Top ]

$_response =

[line 54]

Server response
  • Access: protected

Type:   string


[ Top ]

$_result =

[line 62]

Results from last regular expression match
  • Access: protected

Type:   array


[ Top ]



Method Detail

__construct (Constructor)   [line 84]

Net_GameServerQuery_Protocol __construct( )

Constructor
  • Access: public

[ Top ]

process   [line 98]

array process( $packetname, $response, array $packet)

Process server response according to packet type
  • Return: Array containing formatted server response
  • Access: public

Parameters:

array   $packet   —  Array containing the packet and its type
   $packetname   — 
   $response   — 

[ Top ]

toFloat   [line 205]

float toFloat( string $string)

Conversion to float
  • Return: 32 bit float
  • Access: public

Parameters:

string   $string   —  String to convert

[ Top ]

toInt   [line 226]

int toInt( string $string, [int $bits = 8])

Conversion to integer
  • Return: Integer according to type
  • Access: public

Parameters:

string   $string   —  String to convert
int   $bits   —  Number of bits

[ Top ]

_add   [line 173]

void _add( string $name, string $value)

Adds variable to output
  • Access: protected

Parameters:

string   $name   —  Variable name
string   $value   —  Variable value

[ Top ]

_addPlayer   [line 186]

void _addPlayer( string $name, string $value)

Adds player variable to output
  • Access: protected

Parameters:

string   $name   —  Variable name
string   $value   —  Variable value

[ Top ]

_getPrefix   [line 153]

string _getPrefix( [int $length = 1])

Remove and return a prefix from the response string
  • Return: The prefix
  • Access: protected

Parameters:

int   $length   —  Length of the prefix

[ Top ]

_match   [line 119]

bool _match( string $expr)

Match response to regular expression
  • Return: True if expression was matched, false otherwise
  • Access: protected

Parameters:

string   $expr   —  Regular expression

[ Top ]


Documentation generated on Mon, 11 Mar 2019 13:58:55 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.