SAMConnection::rollback

(PECL sam >= 0.1.0) Cancels (rolls back) an in-flight unit of work. bool SAMConnection::rollback ( void ) Rolls back an in-flight unit of work. Returns: This method returns FALSE if an error occurs. Examples: Cancelling an in-flight unit of work <?php if (!$conn->rollback()) {   // The rollback failed!   echo "

SAMConnection::remove

(PECL sam >= 0.1.0) Remove a message from a queue. SAMMessage SAMConnection::remove ( string $target [, array $properties ] ) Removes a message from a queue. Parameters: target The identity of the queue from which to remove the message. properties An optional associative array of properties describing other parameters to control th

SAMConnection::receive

(PECL sam >= 0.1.0) Receive a message from a queue or subscription. SAMMessage SAMConnection::receive ( string $target [, array $properties ] ) Parameters: target The identity of the queue, topic or subscription from which to receive the message. properties An optional associative array of properties describing other parameters to co

SAMConnection::peekAll

(PECL sam >= 0.2.0) Read one or more messages from a queue without removing it from the queue. array SAMConnection::peekAll ( string $target [, array $properties ] ) Parameters: target The identity of the queue from which messages should be peeked. properties An optional associative array of properties describing other parameters to

SAMConnection::peek

(PECL sam >= 0.1.0) Read a message from a queue without removing it from the queue. SAMMessage SAMConnection::peek ( string $target [, array $properties ] ) Parameters: target The identity of the queue from which to peek the message. properties An optional associative array of properties describing other parameters to control the pee

SAMConnection::isConnected

(PECL sam >= 0.1.0) Queries whether a connection is established to a Messaging Server bool SAMConnection::isConnected ( void ) Calling the "isConnected" method on a Connection object will check whether the PHP script is connected to a messaging server. No messages can be sent or received unless a connection has been established with a Messaging server. Returns: This method returns TRUE if the

SAMConnection::error

(PECL sam >= 0.1.0) Contains the text description of the last failed SAM operation. string $SAMConnection->error; Contains the text description of the last failed SAM operation on this connection. If the last operation completed successfully this property contains an empty string. Returns: A string containing the text description of the last error type encountered on the connection. An empty string indicates

SAMConnection::errno

(PECL sam >= 0.1.0) Contains the unique numeric error code of the last executed SAM operation. int $SAMConnection->errno; Contains the numeric error code of the last executed SAM operation on this connection. If the last operation completed successfully this property contains 0. Returns: An integer greater than zero indicates the last error type encountered on the connection. Zero indicates that the last ope

SAMConnection::disconnect

(PECL sam >= 0.1.0) Disconnects from a Messaging Server bool SAMConnection::disconnect ( void ) Calling the "disconnect" method on a SAMConnection object disconnects the PHP script from a messaging server. No messages can be sent or received after a connection has been disconnected. Returns: Returns TRUE on success or FALSE on failure. Example

SAMConnection::__construct

(PECL sam >= 0.1.0) Creates a new connection to a Messaging Server SAMConnection::__construct ( void ) Creates a new SAMConnection object. Examples: Creating a connection object and connecting to a Messaging Server <?php $conn = new SAMConnection(); $conn->connect(SAM_WMQ, array(SAM_HOST => localhost, SAM_PORT => 1414, SAM_BROKER => 'b