Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

Differences Between: [Versions 39 and 311]

XMPPHP: The PHP XMPP Library Copyright (C) 2008  Nathanael C. Fritz This file is part of SleekXMPP. XMPPHP is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

Author: Nathanael C. Fritz fritzy@netflint.net>
Author: Stephan Wentz stephan@jabber.wentz.it>
Author: Michael Garvin gar@netflint.net>
Author: Alexander Birkner (https://github.com/BirknerAlex)
Copyright: 2008 Nathanael C. Fritz
File Size: 441 lines (12 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: XMPP  - X-Ref

XMPPHP Main Class

__construct($host, $port, $user, $password, $resource, $server = null, $printlog = false, $loglevel = null)   X-Ref
Constructor

param: string  $host
param: integer $port
param: string  $user
param: string  $password
param: string  $resource
param: string  $server
param: boolean $printlog
param: string  $loglevel

useEncryption($useEncryption = true)   X-Ref
Turn encryption on/ff

param: boolean $useEncryption

autoSubscribe($autoSubscribe = true)   X-Ref
Turn on auto-authorization of subscription requests.

param: boolean $autoSubscribe

message($to, $body, $type = 'chat', $subject = null, $payload = null)   X-Ref
Send XMPP Message

param: string $to
param: string $body
param: string $type
param: string $subject

presence($status = null, $show = 'available', $to = null, $type='available', $priority=null)   X-Ref
Set Presence

param: string $status
param: string $show
param: string $to

subscribe($jid)   X-Ref
Send Auth request

param: string $jid

message_handler($xml)   X-Ref
Message handler

param: string $xml

presence_handler($xml)   X-Ref
Presence handler

param: string $xml

features_handler($xml)   X-Ref
Features handler

param: string $xml

sasl_success_handler($xml)   X-Ref
SASL success handler

param: string $xml

sasl_failure_handler($xml)   X-Ref
SASL feature handler

param: string $xml

resource_bind_handler($xml)   X-Ref
Resource bind handler

param: string $xml

getRoster()   X-Ref
Retrieves the roster


roster_iq_handler($xml)   X-Ref
Roster iq handler
Gets all packets matching XPath "iq/{jabber:iq:roster}query'

param: string $xml

session_start_handler($xml)   X-Ref
Session start handler

param: string $xml

tls_proceed_handler($xml)   X-Ref
TLS proceed handler

param: string $xml

getVCard($jid = Null)   X-Ref
Retrieves the vcard


vcard_get_handler($xml)   X-Ref
VCard retrieval handler

param: XML Object $xml