A Jabber2d API via direct database manipulation.

see \global\http://jabberd2.org/
category OSS
package OSS_API
copyright Copyright (c) 2007 - 2012, Open Source Solutions Limited, Dublin, Ireland
license New BSD License

 Methods

Constructor - creates a new DBAL connection.

__construct(array $dbparams) : void

Parameters

$dbparams

array

Adds an authreg entry.

addAuthReg(string $username, string $realm, string $password) : int
access public

Parameters

$username

string

$realm

string

$password

string

Returns

int

Deletes a user's authreg entry, and all related entries.

deleteAuthReg(string $username, string $realm) : void

Encapsulates all the delete statements in one transaction.

access public

Parameters

$username

string

$realm

string

Get all users registered in the database as an array.

getAllUsers() : array

Returns:

array (size=n)
    0 =>
        array (size=3)
            'username' => string 'johndoe' (length=5)
            'realm' => string 'example.com' (length=16)
            'password' => string 'soopersecret' (length=9)
    1 =>
        ...
access public

Returns

arrayAll users registered in the database

Returns with a user's authreg entry as an assciative array, or with false if it wasn't found.

getAuthReg(string $username, string $realm) : array | boolean
access public

Parameters

$username

string

$realm

string

Returns

arrayboolean

Updates an authreg entry.

updateAuthReg(string $username, string $realm, string $password) : int
access public

Parameters

$username

string

$realm

string

$password

string

Returns

int