function.samconnection-remove.html

来自「php的帮助文档,涉及到PHP的案例和基本语法,以及实际应用内容」· HTML 代码 · 共 140 行

HTML
140
字号
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head>  <title>Remove a message from a queue.</title>  <meta http-equiv="content-type" content="text/html; charset=UTF-8"> </head> <body><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.samconnection-receive.html">SAMConnection->receive</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.samconnection-rollback.html">SAMConnection->rollback</a></div> <div class="up"><a href="ref.sam.html">SAM Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div><hr /><div id="function.samconnection-remove" class="refentry"> <div class="refnamediv">  <h1 class="refname">SAMConnection-&gt;remove</h1>  <p class="verinfo">(No version information available, might be only in CVS)</p><p class="refpurpose"><span class="refname">SAMConnection-&gt;remove</span> &mdash; <span class="dc-title">   Remove a message from a queue.  </span></p> </div> <div class="refsect1 description">  <h3 class="title">Description</h3>  <div class="classsynopsis">   <div class="ooclass"><b class="classname">SAMConnection</b></div>   <div class="methodsynopsis dc-description">    <span class="type">SAMMessage</span> <span class="methodname"><b><b>remove</b></b></span>     ( <span class="methodparam"><span class="type">string</span> <tt class="parameter">$target</tt></span>    [, <span class="methodparam"><span class="type">array</span> <tt class="parameter">$properties</tt></span>   ] )</div>  </div>  <p class="para">   Removes a message from a queue.  </p> </div> <div class="refsect1 parameters">  <h3 class="title">Parameters</h3>  <p class="para">   <dl>    <dt>     <span class="term"><i><tt class="parameter">target</tt></i></span>     <dd>      <p class="para">       The identity of the queue from which to remove the message.      </p>     </dd>    </dt>    <dt>     <span class="term"><i><tt class="parameter">properties</tt></i></span>     <dd>      <p class="para">       An optional associative array of properties describing other       parameters to control the remove operation.       <table class="informaltable">        <colgroup>         <thead valign="middle">          <tr valign="middle">           <th colspan="1">Property name</th>           <th colspan="1">Possible values</th>          </tr>         </thead>         <tbody valign="middle" class="tbody">          <tr valign="middle">           <td colspan="1" rowspan="1" align="left">SAM_CORRELID</td>           <td colspan="1" rowspan="1" align="left">            This is the target correlation id string of the message.            This would typically have been returned by a &quot;send&quot; request.           </td>          </tr>          <tr valign="middle">           <td colspan="1" rowspan="1" align="left">SAM_MESSAGEID</td>           <td colspan="1" rowspan="1" align="left">            This is the message id string of the message which is to be            removed.           </td>          </tr>                 </tbody>        </colgroup>       </table>      </p>     </dd>    </dt>   </dl>  </p> </div> <div class="refsect1 returnvalues">  <h3 class="title">Return Values</h3>  <p class="para">   This method returns <b><tt>FALSE</tt></b> if an error occurs.  </p> </div> <div class="refsect1 examples">  <h3 class="title">Examples</h3>  <p class="para">   <div class="example">    <p><b>Example #1 Removing a message from a queue by message id</b></p>    <div class="example-contents"><div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /></span><span style="color: #007700">if&nbsp;(!</span><span style="color: #0000BB">$conn</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">remove</span><span style="color: #007700">(</span><span style="color: #DD0000">'queue://receive/test'</span><span style="color: #007700">,&nbsp;array(</span><span style="color: #0000BB">SAM_MESSAGEID&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">$messageId</span><span style="color: #007700">)))&nbsp;{<br />&nbsp;&nbsp;</span><span style="color: #FF8000">//&nbsp;The&nbsp;remove&nbsp;failed!<br />&nbsp;&nbsp;</span><span style="color: #007700">echo&nbsp;</span><span style="color: #DD0000">"Remove&nbsp;failed&nbsp;($conn-&gt;errno)&nbsp;$conn-&gt;error"</span><span style="color: #007700">;<br />}<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>    </div>   </div>  </p> </div></div><hr /><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.samconnection-receive.html">SAMConnection->receive</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.samconnection-rollback.html">SAMConnection->rollback</a></div> <div class="up"><a href="ref.sam.html">SAM Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div></body></html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?