class jabber
Jabber class from Flyspray project
Properties
| $connection | ||
| $session | ||
| $timeout | ||
| $server | ||
| $connect_server | ||
| $port | ||
| $username | ||
| $password | ||
| $use_ssl | ||
| $resource | ||
| $enable_logging | ||
| $log_array | ||
| $features |
Methods
|
jabber($server, $port, $username, $password, $use_ssl = false)
|
||
| static |
can_use_ssl()
Able to use the SSL functionality? |
|
| static |
can_use_tls()
Able to use TLS? |
|
|
set_resource(string $name)
Sets the resource which is used. |
||
|
connect()
Connect |
||
|
disconnect()
Disconnect |
||
|
connected()
Connected? |
||
| bool |
login()
Initiates login (using data from contructor, after calling connect()) |
|
| bool |
send(string $xml)
Send data to the Jabber server |
|
| bool |
open_socket(string $server, int $port, bool $use_ssl = false)
OpenSocket |
|
|
get_log()
Return log |
||
|
add_to_log($string)
Add information to log |
||
| mixed |
listen($timeout = 10, $wait = false)
Listens to the connection until it gets data or the timeout is reached. |
|
| bool |
register()
Initiates account registration (based on data used for contructor) |
|
| bool |
send_presence($message $message = '', $type $type = '', $unavailable $unavailable = false)
Sets account presence. |
|
| bool |
response(array $xml)
This handles all the different XML elements |
|
|
send_message($to, $text, $subject = '', $type = 'normal')
|
||
| string |
encrypt_password(array $data)
Encrypts a password as in RFC 2831 |
|
| array |
parse_data(string $data)
parse_data like a="b",c="d",... |
|
| string |
implode_data(array $data)
opposite of jabber::parse_data() |
|
|
xmlize($data, $skip_white = 1, $encoding = 'UTF-8')
xmlize() |
||
|
_xml_depth($vals, $i)
xmldepth() |
Details
at line 53
public
jabber($server, $port, $username, $password, $use_ssl = false)
at line 88
static public
can_use_ssl()
Able to use the SSL functionality?
at line 97
static public
can_use_tls()
Able to use TLS?
at line 124
public
set_resource(string $name)
Sets the resource which is used.
No validation is done here, only escaping.
at line 132
public
connect()
Connect
at line 161
public
disconnect()
Disconnect
at line 182
public
connected()
Connected?
at line 193
public bool
login()
Initiates login (using data from contructor, after calling connect())
at line 210
public bool
send(string $xml)
Send data to the Jabber server
at line 233
public bool
open_socket(string $server, int $port, bool $use_ssl = false)
OpenSocket
at line 262
public
get_log()
Return log
at line 275
public
add_to_log($string)
Add information to log
at line 289
public mixed
listen($timeout = 10, $wait = false)
Listens to the connection until it gets data or the timeout is reached.
Thus, it should only be called if data is expected to be received.
at line 324
public bool
register()
Initiates account registration (based on data used for contructor)
at line 344
public bool
send_presence($message $message = '', $type $type = '', $unavailable $unavailable = false)
Sets account presence.
No additional info required (default is "online" status)
at line 369
public bool
response(array $xml)
This handles all the different XML elements
at line 678
public
send_message($to, $text, $subject = '', $type = 'normal')
at line 703
public string
encrypt_password(array $data)
Encrypts a password as in RFC 2831
at line 737
public array
parse_data(string $data)
parse_data like a="b",c="d",...
or like a="a, b", c, d="e", f=g,...
at line 769
public string
implode_data(array $data)
opposite of jabber::parse_data()
at line 784
public
xmlize($data, $skip_white = 1, $encoding = 'UTF-8')
xmlize()
at line 820
public
_xml_depth($vals, $i)
xmldepth()