PHP Класс PHPDaemon\Clients\XMPP\Connection

Автор: Vasily Zorin ([email protected])
Наследование: extends PHPDaemon\Network\ClientConnection
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$authorized boolean
$fulljid string
$keepaliveTimer Timer ID
$lastId integer
$roster XMPPRoster
$use_encryption boolean
$xml PHPDaemon\XMLStream\XMLStream

Открытые методы

Метод Описание
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 ( )

Описание методов

createXMLStream() публичный Метод

public createXMLStream ( )

getId() публичный Метод

Get next ID
public getId ( ) : string
Результат string

getVCard() публичный Метод

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

iqGet() публичный Метод

public iqGet ( string $xml, callable $cb ) : boolean
$xml string
$cb callable
Результат boolean

iqGetTo() публичный Метод

public iqGetTo ( string $to, string $xml, callable $cb ) : boolean
$to string
$xml string
$cb callable
Результат boolean

iqSet() публичный Метод

public iqSet ( string $xml, callable $cb ) : boolean
$xml string
$cb callable
Результат boolean

iqSetTo() публичный Метод

public iqSetTo ( string $to, string $xml, callable $cb ) : boolean
$to string
$xml string
$cb callable
Результат boolean

message() публичный Метод

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() публичный Метод

Called when session finishes
public onFinish ( ) : void
Результат void

onRead() публичный Метод

Called when new data received
public onRead ( ) : void
Результат void

onReady() публичный Метод

Called when the connection is handshaked (at low-level), and peer is ready to recv. data
public onReady ( ) : void
Результат void

ping() публичный Метод

public ping ( string $to = null, callable $cb = null ) : boolean
$to string
$cb callable
Результат boolean

presence() публичный Метод

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 queryGet ( string $ns, callable $cb ) : boolean
$ns string
$cb callable
Результат boolean

querySet() публичный Метод

public querySet ( string $ns, string $xml, callable $cb ) : boolean
$ns string
$xml string
$cb callable
Результат boolean

querySetTo() публичный Метод

public querySetTo ( string $to, string $ns, string $xml, callable $cb ) : boolean
$to string
$ns string
$xml string
$cb callable
Результат boolean

sendXML() публичный Метод

public sendXML ( string $s )
$s string

startXMLStream() публичный Метод

public startXMLStream ( )

Описание свойств

$authorized публичное свойство

public bool $authorized
Результат boolean

$fulljid публичное свойство

public string $fulljid
Результат string

$keepaliveTimer публичное свойство

Timer ID
public $keepaliveTimer

$lastId публичное свойство

public int $lastId
Результат integer

$roster публичное свойство

public XMPPRoster,PHPDaemon\Clients\XMPP $roster
Результат XMPPRoster

$use_encryption публичное свойство

public bool $use_encryption
Результат boolean

$xml публичное свойство

public XMLStream,PHPDaemon\XMLStream $xml
Результат PHPDaemon\XMLStream\XMLStream