Moodle  2.2.1
http://www.collinsharper.com
XMPPHP_XMLStream Class Reference
Inheritance diagram for XMPPHP_XMLStream:

Public Member Functions

 __construct ($host=null, $port=null, $printlog=false, $loglevel=null, $is_server=false)
 __destruct ()
 getLog ()
 getId ()
 useSSL ($use=true)
 addIdHandler ($id, $pointer, $obj=null)
 addHandler ($name, $ns, $pointer, $obj=null, $depth=1)
 addXPathHandler ($xpath, $pointer, $obj=null)
 addEventHandler ($name, $pointer, $obj)
 connect ($timeout=30, $persistent=false, $sendinit=true)
 doReconnect ()
 setReconnectTimeout ($timeout)
 disconnect ()
 isDisconnected ()
 process ()
 processTime ($timeout=NULL)
 processUntil ($event, $timeout=-1)
 Xapply_socket ($socket)
 startXML ($parser, $name, $attr)
 endXML ($parser, $name)
 charXML ($parser, $data)
 event ($name, $payload=null)
 read ()
 send ($msg, $timeout=NULL)
 time ()
 reset ()
 setupParser ()
 readyToProcess ()

Protected Attributes

 $socket
 $parser
 $buffer
 $xml_depth = 0
 $host
 $port
 $stream_start = '<stream>'
 $stream_end = '</stream>'
 $disconnected = false
 $sent_disconnect = false
 $ns_map = array()
 $current_ns = array()
 $xmlobj = null
 $nshandlers = array()
 $xpathhandlers = array()
 $idhandlers = array()
 $eventhandlers = array()
 $lastid = 0
 $default_ns
 $until = ''
 $until_count = ''
 $until_happened = false
 $until_payload = array()
 $log
 $reconnect = true
 $been_reset = false
 $is_server
 $last_send = 0
 $use_ssl = false
 $reconnectTimeout = 30

Detailed Description

Definition at line 49 of file XMLStream.php.


Constructor & Destructor Documentation

__construct ( host = null,
port = null,
printlog = false,
loglevel = null,
is_server = false 
)

Constructor

Parameters:
string$host
string$port
boolean$printlog
string$loglevel
boolean$is_server

Definition at line 180 of file XMLStream.php.

Here is the call graph for this function:

Destructor Cleanup connection

Definition at line 193 of file XMLStream.php.

Here is the call graph for this function:


Member Function Documentation

addEventHandler ( name,
pointer,
obj 
)

Add Event Handler

Parameters:
integer$id
string$pointer
string$obj

Definition at line 284 of file XMLStream.php.

addHandler ( name,
ns,
pointer,
obj = null,
depth = 1 
)

Add Handler

Parameters:
string$name
string$ns
string$pointer
string$obj
integer$depth

Definition at line 247 of file XMLStream.php.

addIdHandler ( id,
pointer,
obj = null 
)

Add ID Handler

Parameters:
integer$id
string$pointer
string$obj

Definition at line 234 of file XMLStream.php.

Here is the caller graph for this function:

addXPathHandler ( xpath,
pointer,
obj = null 
)

Add XPath Handler

Parameters:
string$xpath
string$pointer

Definition at line 259 of file XMLStream.php.

Here is the caller graph for this function:

charXML ( parser,
data 
)

XML character callback

See also:
xml_set_character_data_handler
Parameters:
resource$parser
string$data

Definition at line 624 of file XMLStream.php.

Here is the call graph for this function:

connect ( timeout = 30,
persistent = false,
sendinit = true 
)

Connect to XMPP Host

Parameters:
integer$timeout
boolean$persistent
boolean$sendinit

Reimplemented in XMPPHP_BOSH.

Definition at line 295 of file XMLStream.php.

Here is the call graph for this function:

Here is the caller graph for this function:

Disconnect from XMPP Host

Definition at line 350 of file XMLStream.php.

Here is the call graph for this function:

Here is the caller graph for this function:

Reconnect XMPP Host

Definition at line 334 of file XMLStream.php.

Here is the call graph for this function:

Here is the caller graph for this function:

endXML ( parser,
name 
)

XML end callback

See also:
xml_set_element_handler
Parameters:
resource$parser
string$name

Definition at line 540 of file XMLStream.php.

Here is the call graph for this function:

event ( name,
payload = null 
)

Event?

Parameters:
string$name
string$payload

Definition at line 636 of file XMLStream.php.

Here is the caller graph for this function:

getId ( )

Get next ID

Returns:
integer

Definition at line 213 of file XMLStream.php.

Here is the caller graph for this function:

getLog ( )

Return the log instance

Returns:
XMPPHP_Log

Definition at line 204 of file XMLStream.php.

Are we are disconnected?

Returns:
boolean

Definition at line 367 of file XMLStream.php.

process ( )

Process

Returns:
string

Definition at line 436 of file XMLStream.php.

processTime ( timeout = NULL)

Process until a timeout occurs

Parameters:
integer$timeout
Returns:
string

Definition at line 446 of file XMLStream.php.

processUntil ( event,
timeout = -1 
)

Process until a specified event or a timeout occurs

Parameters:
string | array$event
integer$timeout
Returns:
string

Definition at line 461 of file XMLStream.php.

Here is the call graph for this function:

Here is the caller graph for this function:

read ( )

Read from socket

Definition at line 663 of file XMLStream.php.

Here is the call graph for this function:

Definition at line 756 of file XMLStream.php.

reset ( )

Reset connection

Reimplemented in XMPPHP_BOSH.

Definition at line 733 of file XMLStream.php.

Here is the call graph for this function:

Here is the caller graph for this function:

send ( msg,
timeout = NULL 
)

Send to socket

Parameters:
string$msg

Definition at line 682 of file XMLStream.php.

Here is the call graph for this function:

Here is the caller graph for this function:

setReconnectTimeout ( timeout)

Definition at line 343 of file XMLStream.php.

Setup the XML parser

Definition at line 747 of file XMLStream.php.

Here is the caller graph for this function:

startXML ( parser,
name,
attr 
)

XML start callback

See also:
xml_set_element_handler
Parameters:
resource$parser
string$name

Reimplemented in XMPPHP_XMPPOld.

Definition at line 499 of file XMLStream.php.

Here is the call graph for this function:

time ( )

Definition at line 725 of file XMLStream.php.

Here is the caller graph for this function:

useSSL ( use = true)

Set SSL

Returns:
integer

Definition at line 223 of file XMLStream.php.

Xapply_socket ( socket)

Obsolete?

Definition at line 487 of file XMLStream.php.


Field Documentation

$been_reset = false [protected]

Definition at line 153 of file XMLStream.php.

$buffer [protected]

Definition at line 61 of file XMLStream.php.

$current_ns = array() [protected]

Definition at line 97 of file XMLStream.php.

$default_ns [protected]

Definition at line 125 of file XMLStream.php.

$disconnected = false [protected]

Definition at line 85 of file XMLStream.php.

$eventhandlers = array() [protected]

Definition at line 117 of file XMLStream.php.

$host [protected]

Definition at line 69 of file XMLStream.php.

$idhandlers = array() [protected]

Definition at line 113 of file XMLStream.php.

$is_server [protected]

Definition at line 157 of file XMLStream.php.

$last_send = 0 [protected]

Definition at line 161 of file XMLStream.php.

$lastid = 0 [protected]

Definition at line 121 of file XMLStream.php.

$log [protected]

Definition at line 145 of file XMLStream.php.

$ns_map = array() [protected]

Definition at line 93 of file XMLStream.php.

$nshandlers = array() [protected]

Definition at line 105 of file XMLStream.php.

$parser [protected]

Definition at line 57 of file XMLStream.php.

$port [protected]

Definition at line 73 of file XMLStream.php.

$reconnect = true [protected]

Definition at line 149 of file XMLStream.php.

$reconnectTimeout = 30 [protected]

Definition at line 169 of file XMLStream.php.

$sent_disconnect = false [protected]

Definition at line 89 of file XMLStream.php.

$socket [protected]

Definition at line 53 of file XMLStream.php.

$stream_end = '</stream>' [protected]

Definition at line 81 of file XMLStream.php.

$stream_start = '<stream>' [protected]

Definition at line 77 of file XMLStream.php.

$until = '' [protected]

Definition at line 129 of file XMLStream.php.

$until_count = '' [protected]

Definition at line 133 of file XMLStream.php.

$until_happened = false [protected]

Definition at line 137 of file XMLStream.php.

$until_payload = array() [protected]

Definition at line 141 of file XMLStream.php.

$use_ssl = false [protected]

Definition at line 165 of file XMLStream.php.

$xml_depth = 0 [protected]

Definition at line 65 of file XMLStream.php.

$xmlobj = null [protected]

Definition at line 101 of file XMLStream.php.

$xpathhandlers = array() [protected]

Definition at line 109 of file XMLStream.php.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations