SAMConnection->connect()
SAMConnection->connect - Establishes a connection to a Messaging Server
Syntax
bool SAMConnection->connect (
string $protocol,
array $properties)
Arguments
- protocol - Name of a function which expects one parameter. Output generated by sandbox will be passed to this callback. Anything returned by the callback will be displayed normally. If this parameter is not passed then output handling will not be changed. If a non-truth value is passed, output handling will be disabled and will revert to direct display.
- properties - Name of a function which expects one parameter. Output generated by sandbox will be passed to this callback. Anything returned by the callback will be displayed normally. If this parameter is not passed then output handling will not be changed. If a non-truth value is passed, output handling will be disabled and will revert to direct display.
Description
Calling the "connect" method on a SAMConnection object connects the PHP script to a messaging server. No messages can be sent or received until a connection is made.
Version
PHP PECL sam >= 0.1.0
Return value
This method returns FALSE if an error occurs.