PHP Class PHPDaemon\Clients\XMPP\Connection

Author: Vasily Zorin ([email protected])
Inheritance: extends PHPDaemon\Network\ClientConnection
ファイルを表示 Open project: kakserpom/phpdaemon Class Usage Examples

Public Properties

Property Type Description
$authorized boolean
$fulljid string
$keepaliveTimer Timer ID
$lastId integer
$roster XMPPRoster
$use_encryption boolean
$xml PHPDaemon\XMLStream\XMLStream

Public Methods

Method Description
createXMLStream ( )
getId ( ) : string Get next ID
getVCard ( string $jid, callable $cb )
iqGet ( string $xml, callable $cb ) : boolean
iqGetTo ( string $to, string $xml, callable $cb ) : boolean
iqSet ( string $xml, callable $cb ) : boolean
iqSetTo ( string $to, string $xml, callable $cb ) : boolean
message ( string $to, string $body, string $type = 'chat', string $subject = null, $payload = null ) Send XMPP Message
onFinish ( ) : void Called when session finishes
onRead ( ) : void Called when new data received
onReady ( ) : void Called when the connection is handshaked (at low-level), and peer is ready to recv. data
ping ( string $to = null, callable $cb = null ) : boolean
presence ( string $status = null, string $show = 'available', string $to = null, string $type = 'available', integer $priority ) Set Presence
queryGet ( string $ns, callable $cb ) : boolean
querySet ( string $ns, string $xml, callable $cb ) : boolean
querySetTo ( string $to, string $ns, string $xml, callable $cb ) : boolean
sendXML ( string $s )
startXMLStream ( )

Method Details

createXMLStream() public method

public createXMLStream ( )

getId() public method

Get next ID
public getId ( ) : string
return string

getVCard() public method

public getVCard ( string $jid, callable $cb )
$jid string
$cb callable

iqGet() public method

public iqGet ( string $xml, callable $cb ) : boolean
$xml string
$cb callable
return boolean

iqGetTo() public method

public iqGetTo ( string $to, string $xml, callable $cb ) : boolean
$to string
$xml string
$cb callable
return boolean

iqSet() public method

public iqSet ( string $xml, callable $cb ) : boolean
$xml string
$cb callable
return boolean

iqSetTo() public method

public iqSetTo ( string $to, string $xml, callable $cb ) : boolean
$to string
$xml string
$cb callable
return boolean

message() public method

Send XMPP Message
public message ( string $to, string $body, string $type = 'chat', string $subject = null, $payload = null )
$to string
$body string
$type string
$subject string

onFinish() public method

Called when session finishes
public onFinish ( ) : void
return void

onRead() public method

Called when new data received
public onRead ( ) : void
return void

onReady() public method

Called when the connection is handshaked (at low-level), and peer is ready to recv. data
public onReady ( ) : void
return void

ping() public method

public ping ( string $to = null, callable $cb = null ) : boolean
$to string
$cb callable
return boolean

presence() public method

Set Presence
public presence ( string $status = null, string $show = 'available', string $to = null, string $type = 'available', integer $priority )
$status string
$show string
$to string
$type string
$priority integer

queryGet() public method

public queryGet ( string $ns, callable $cb ) : boolean
$ns string
$cb callable
return boolean

querySet() public method

public querySet ( string $ns, string $xml, callable $cb ) : boolean
$ns string
$xml string
$cb callable
return boolean

querySetTo() public method

public querySetTo ( string $to, string $ns, string $xml, callable $cb ) : boolean
$to string
$ns string
$xml string
$cb callable
return boolean

sendXML() public method

public sendXML ( string $s )
$s string

startXMLStream() public method

public startXMLStream ( )

Property Details

$authorized public_oe property

public bool $authorized
return boolean

$fulljid public_oe property

public string $fulljid
return string

$keepaliveTimer public_oe property

Timer ID
public $keepaliveTimer

$lastId public_oe property

public int $lastId
return integer

$roster public_oe property

public XMPPRoster,PHPDaemon\Clients\XMPP $roster
return XMPPRoster

$use_encryption public_oe property

public bool $use_encryption
return boolean

$xml public_oe property

public XMLStream,PHPDaemon\XMLStream $xml
return PHPDaemon\XMLStream\XMLStream