mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Updates for release 0.2.0 adding install, peek, peekAll and remove details.
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@223732 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
5bd0d374dd
commit
3b3f8a0b4b
18 changed files with 191 additions and 38 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<refentry id='function.SAM-Connection-commit'>
|
||||
<refnamediv>
|
||||
<refname>SAMConnection::commit()</refname>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<refentry id='function.SAM-Connection-connect'>
|
||||
<refnamediv>
|
||||
<refname>SAMConnection::connect()</refname>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<refentry id='function.SAM-Connection-constructor'>
|
||||
<refnamediv>
|
||||
<refname>SAMConnection::SAMConnection()</refname>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<refentry id='function.SAM-Connection-disconnect'>
|
||||
<refnamediv>
|
||||
<refname>SAMConnection::disconnect()</refname>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<refentry id="function.SAM-Connection-errno">
|
||||
<refnamediv>
|
||||
<refname>SAMConnection->errno</refname>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<refentry id="function.SAM-Connection-error">
|
||||
<refnamediv>
|
||||
<refname>SAMConnection->error</refname>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<refentry id='function.SAM-Connection-isConnected'>
|
||||
<refnamediv>
|
||||
<refname>SAMConnection::isConnected()</refname>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<refentry id='function.SAM-Connection-peek'>
|
||||
<refnamediv>
|
||||
<refname>SAMConnection::peek()</refname>
|
||||
|
@ -18,9 +18,6 @@
|
|||
<methodparam choice='opt'><type>array</type><parameter>properties</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
</classsynopsis>
|
||||
<para>
|
||||
Warning: This method is not currently implemented.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
|
@ -50,9 +47,13 @@
|
|||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>SAM_SELECT</entry>
|
||||
<entry>String selector used to select messages from the queue. Typically this the correlation id string returned by a "send" request.</entry>
|
||||
<entry>SAM_CORRELID</entry>
|
||||
<entry>This is the target correlation id string of the message. This would typically have been returned by a "send" request.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>SAM_MESSAGEID</entry>
|
||||
<entry>This is the message id string of the message which is to be peeked.</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
|
@ -96,7 +97,7 @@ if (!$msg) {
|
|||
<![CDATA[
|
||||
<?php
|
||||
|
||||
$msg = $conn->peek('queue://receive/test', array(SAM_SELECT => $token));
|
||||
$msg = $conn->peek('queue://receive/test', array(SAM_MESSAGEID => $messageId));
|
||||
|
||||
?>
|
||||
]]>
|
||||
|
|
142
reference/sam/functions/SAM-Connection-peekall.xml
Normal file
142
reference/sam/functions/SAM-Connection-peekall.xml
Normal file
|
@ -0,0 +1,142 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<refentry id='function.SAM-Connection-peekAll'>
|
||||
<refnamediv>
|
||||
<refname>SAMConnection::peekAll()</refname>
|
||||
<refpurpose>
|
||||
Read one or more messages from a queue without removing it from the queue.
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<classsynopsis>
|
||||
<ooclass><classname>SAMConnection</classname></ooclass>
|
||||
<methodsynopsis>
|
||||
<type>array</type><methodname>peekAll</methodname>
|
||||
<methodparam><type>string</type><parameter>target</parameter></methodparam>
|
||||
<methodparam choice='opt'><type>array</type><parameter>properties</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
</classsynopsis>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>target</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The identity of the queue from which messages should be peeked.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>properties</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
An optional associative array of properties describing other parameters to control the peek operation.
|
||||
<informaltable>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>Property name</entry>
|
||||
<entry>Possible values</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>SAM_CORRELID</entry>
|
||||
<entry>This is the target correlation id string of messages to be peeked. This would typically have been returned by a "send" request.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>SAM_MESSAGEID</entry>
|
||||
<entry>This is the message id string of a message which is to be peeked.</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
This method returns an array of SAMMessage objects or &false; if an error occurs.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title>Retrieve all messages in a queue without removing them</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$msgArray = $conn->peekAll('queue://receive/test');
|
||||
if ($msgArray) {
|
||||
|
||||
foreach ( $msgArray as $key => $msg) {
|
||||
echo "Message $key: body = $msg->body\n";
|
||||
}
|
||||
}
|
||||
else
|
||||
echo "PeekAll failed ($conn->errno) $conn->error";
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
<example>
|
||||
<title>Retrieve all messages from a queue with a matching correlation id</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
$msgArray = $conn->peekAll('queue://receive/test', array(SAM_CORRELID => $correlId ));
|
||||
if ($msgArray) {
|
||||
|
||||
foreach ( $msgArray as $key => $msg) {
|
||||
echo "Message $key: body = $msg->body\n";
|
||||
}
|
||||
}
|
||||
else
|
||||
echo "PeekAll failed ($conn->errno) $conn->error";
|
||||
}
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../../manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<refentry id='function.SAM-Connection-receive'>
|
||||
<refnamediv>
|
||||
<refname>SAMConnection::receive()</refname>
|
||||
|
@ -47,10 +47,12 @@
|
|||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>SAM_SELECT</entry>
|
||||
<entry>
|
||||
String selector used to select messages from the queue. Typically this the correlation id string returned by a "send" request.
|
||||
</entry>
|
||||
<entry>SAM_CORRELID</entry>
|
||||
<entry>Used to request selection of the message to receive based upon the correlation id string of the message.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>SAM_MESSAGEID</entry>
|
||||
<entry>Used to request selection of the message to receive based upon the message id string of the message.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>SAM_WAIT</entry>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<refentry id='function.SAM-Connection-remove'>
|
||||
<refnamediv>
|
||||
<refname>SAMConnection::remove()</refname>
|
||||
|
@ -18,9 +18,6 @@
|
|||
<methodparam choice='opt'><type>array</type><parameter>properties</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
</classsynopsis>
|
||||
<para>
|
||||
Warning: This method is not currently implemented.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
|
@ -50,9 +47,13 @@
|
|||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>SAM_SELECT</entry>
|
||||
<entry>String selector used to select messages from the queue. Typically this the correlation id string returned by a "send" request.</entry>
|
||||
<entry>SAM_CORRELID</entry>
|
||||
<entry>This is the target correlation id string of the message. This would typically have been returned by a "send" request.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>SAM_MESSAGEID</entry>
|
||||
<entry>This is the message id string of the message which is to be removed.</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
|
@ -74,11 +75,11 @@
|
|||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title>Removing a message from a queue with options</title>
|
||||
<title>Removing a message from a queue by message id</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
if (!$conn->remove('queue://receive/test', array(SAM_SELECT => $token))) {
|
||||
if (!$conn->remove('queue://receive/test', array(SAM_MESSAGEID => $messageId))) {
|
||||
// The remove failed!
|
||||
echo "Remove failed ($conn->errno) $conn->error";
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<refentry id='function.SAM-Connection-rollback'>
|
||||
<refnamediv>
|
||||
<refname>SAMConnection::rollback()</refname>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<refentry id='function.SAM-Connection-send'>
|
||||
<refnamediv>
|
||||
<refname>SAMConnection::send()</refname>
|
||||
|
@ -78,10 +78,10 @@
|
|||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>SAM_SELECT</entry>
|
||||
<entry>SAM_CORRELID</entry>
|
||||
<entry>
|
||||
A string to be assigned as a correlation id for this message. If no value is given the messaging server
|
||||
may assign automatically.
|
||||
may assign a value automatically.
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<refentry id='function.SAM-Connection-subscribe'>
|
||||
<refnamediv>
|
||||
<refname>SAMConnection::subscribe()</refname>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<refentry id='function.SAM-Connection-unsubscribe'>
|
||||
<refnamediv>
|
||||
<refname>SAMConnection::unsubscribe()</refname>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<refentry id='function.SAM-Message-body'>
|
||||
<refnamediv>
|
||||
<refname>SAMMessage::body</refname>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<refentry id='function.SAM-Message-constructor'>
|
||||
<refnamediv>
|
||||
<refname>SAMMessage::SAMMessage()</refname>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<refentry id='function.SAM-Message-header'>
|
||||
<refnamediv>
|
||||
<refname>SAMMessage::header</refname>
|
||||
|
@ -31,6 +31,13 @@
|
|||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>SAM_MESSAGEID</entry>
|
||||
<entry>
|
||||
When a message is received this field contains the unique identifier of the message as allocated
|
||||
by the underlying messaging system. When sending a message this field is ignored.
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>SAM_REPLY_TO</entry>
|
||||
<entry>
|
||||
|
@ -88,7 +95,7 @@
|
|||
<?php
|
||||
$msg = new SAMMessage();
|
||||
|
||||
$msg->header->myPropertyName = ('textData', SAM_STRING);
|
||||
$msg->header->myPropertyName = array('textData', SAM_STRING);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
|
@ -213,7 +220,7 @@
|
|||
<![CDATA[
|
||||
<?php
|
||||
|
||||
// accessing an application specifc property
|
||||
// accessing an application specific property
|
||||
$intProp = $msg->header->'MyIntProp';
|
||||
|
||||
// accessing a messaging system specific property
|
||||
|
|
Loading…
Reference in a new issue