PHP Class PHPDaemon\Clients\XMPP\XMPPRoster

Inheritance: use trait PHPDaemon\Traits\EventHandlers, use trait PHPDaemon\Traits\ClassWatchdog, use trait PHPDaemon\Traits\StaticObjectWatchdog
Datei anzeigen Open project: kakserpom/phpdaemon

Public Properties

Property Type Description
$auto_subscribe boolean
$ns string
$roster_array array
$track_presence boolean
$xmpp Connection

Public Methods

Method Description
__construct ( Connection $xmpp ) Constructor
_addContact ( string $jid, string $subscription, string $name = '', array $groups = [] ) Add given contact to roster
fetch ( callable $cb = null )
getContact ( string $jid ) : array | null Retrieve contact via jid
getPresence ( string $jid ) : array | false Return best presence for jid
isContact ( string $jid ) : boolean Discover if a contact exists in the roster via jid
rosterSet ( string $xml, callable $cb = null )
setPresence ( string $presence, integer $priority, string $show, string $status ) Set presence
setSubscription ( string $jid, string $type, callable $cb = null )

Method Details

__construct() public method

Constructor
public __construct ( Connection $xmpp )
$xmpp Connection

_addContact() public method

Add given contact to roster
public _addContact ( string $jid, string $subscription, string $name = '', array $groups = [] )
$jid string
$subscription string
$name string
$groups array

fetch() public method

public fetch ( callable $cb = null )
$cb callable

getContact() public method

Retrieve contact via jid
public getContact ( string $jid ) : array | null
$jid string
return array | null

getPresence() public method

Return best presence for jid
public getPresence ( string $jid ) : array | false
$jid string
return array | false

isContact() public method

Discover if a contact exists in the roster via jid
public isContact ( string $jid ) : boolean
$jid string
return boolean

rosterSet() public method

public rosterSet ( string $xml, callable $cb = null )
$xml string
$cb callable

setPresence() public method

Set presence
public setPresence ( string $presence, integer $priority, string $show, string $status )
$presence string
$priority integer
$show string
$status string

setSubscription() public method

public setSubscription ( string $jid, string $type, callable $cb = null )
$jid string
$type string
$cb callable

Property Details

$auto_subscribe public_oe property

public bool $auto_subscribe
return boolean

$ns public_oe property

public string $ns
return string

$roster_array public_oe property

public array $roster_array
return array

$track_presence public_oe property

public bool $track_presence
return boolean

$xmpp public_oe property

public Connection,PHPDaemon\Clients\XMPP $xmpp
return Connection