A Jabber2d API via direct database manipulation.
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
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.
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 =>
...
Returns
array
All 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
Parameters
$username
string
$realm
string
Returns
array
boolean
Updates an authreg entry.
updateAuthReg(string $username, string $realm, string $password) : int
Parameters
$username
string
$realm
string
$password
string
Returns
int