<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>Prepares for an Extended Service Request</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.yaz-es-result.html">yaz_es_result</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.yaz-get-option.html">yaz_get_option</a></div> <div class="up"><a href="ref.yaz.html">YAZ Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="function.yaz-es" class="refentry"> <div class="refnamediv"> <h1 class="refname">yaz_es</h1> <p class="verinfo">(PECL yaz >= 0.9.0)</p><p class="refpurpose"><span class="refname">yaz_es</span> — <span class="dc-title"> Prepares for an Extended Service Request </span></p> </div> <div class="refsect1 description" id="refsect1-function.yaz-es-description"> <h3 class="title">Description</h3> <div class="methodsynopsis dc-description"> <span class="type"><span class="type void">void</span></span> <span class="methodname"><strong>yaz_es</strong></span> ( <span class="methodparam"> <span class="type">resource</span> <code class="parameter">$id</code> </span> , <span class="methodparam"> <span class="type">string</span> <code class="parameter">$type</code> </span> , <span class="methodparam"> <span class="type">array</span> <code class="parameter">$args</code> </span> )</div> <p class="para rdfs-comment"> This function prepares for an Extended Service Request. Extended Services is family of various Z39.50 facilities, such as Record Update, Item Order, Database administration etc. </p> <blockquote class="note"><p><strong class="note">Note</strong>: <p class="para"> Many Z39.50 Servers do not support Extended Services. </p> </p></blockquote> <p class="para"> The <span class="function"><strong>yaz_es()</strong></span> creates an Extended Service Request packages and puts it into a queue of operations. Use <span class="function"><a href="function.yaz-wait.html" class="function">yaz_wait()</a></span> to send the request(s) to the server. After completion of <span class="function"><a href="function.yaz-wait.html" class="function">yaz_wait()</a></span> the result of the Extended Service operation should be expected with a call to <span class="function"><a href="function.yaz-es-result.html" class="function">yaz_es_result()</a></span>. </p> </div> <div class="refsect1 parameters" id="refsect1-function.yaz-es-parameters"> <h3 class="title">Parameters</h3> <p class="para"> <dl> <dt> <span class="term"><em><code class="parameter">id</code></em></span> <dd> <p class="para"> The connection resource returned by <span class="function"><a href="function.yaz-connect.html" class="function">yaz_connect()</a></span>. </p> </dd> </dt> <dt> <span class="term"><em><code class="parameter">type</code></em></span> <dd> <p class="para"> A string which represents the type of the Extended Service: <em>itemorder</em> (Item Order), <em>create</em> (Create Database), <em>drop</em> (Drop Database), <em>commit</em> (Commit Operation), <em>update</em> (Update Record), <em>xmlupdate</em> (XML Update). Each type is specified in the following section. </p> </dd> </dt> <dt> <span class="term"><em><code class="parameter">args</code></em></span> <dd> <p class="para"> An array with extended service options plus package specific options. The options are identical to those offered in the C API of ZOOM C. Refer to the ZOOM <a href="http://www.indexdata.dk/yaz/doc/zoom.tkl" class="link external">» Extended Services</a>. </p> </dd> </dt> </dl> </p> </div> <div class="refsect1 returnvalues" id="refsect1-function.yaz-es-returnvalues"> <h3 class="title">Return Values</h3> <p class="para"> No value is returned. </p> </div> <div class="refsect1 examples" id="refsect1-function.yaz-es-examples"> <h3 class="title">Examples</h3> <div class="example" id="example-4681"> <p><strong>Example #1 Record Update</strong></p> <div class="example-contents"> <div class="phpcode"><code><span style="color: #000000"> <span style="color: #0000BB"><?php<br />$con </span><span style="color: #007700">= </span><span style="color: #0000BB">yaz_connect</span><span style="color: #007700">(</span><span style="color: #DD0000">"myhost/database"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$args </span><span style="color: #007700">= array (<br /> </span><span style="color: #DD0000">"record" </span><span style="color: #007700">=> </span><span style="color: #DD0000">"<gils><title>some title</title></gils>"</span><span style="color: #007700">,<br /> </span><span style="color: #DD0000">"syntax" </span><span style="color: #007700">=> </span><span style="color: #DD0000">"xml"</span><span style="color: #007700">,<br /> </span><span style="color: #DD0000">"action" </span><span style="color: #007700">=> </span><span style="color: #DD0000">"specialUpdate"<br /></span><span style="color: #007700">);<br /></span><span style="color: #0000BB">yaz_es</span><span style="color: #007700">(</span><span style="color: #0000BB">$con</span><span style="color: #007700">, </span><span style="color: #DD0000">"update"</span><span style="color: #007700">, </span><span style="color: #0000BB">$args</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">yaz_wait</span><span style="color: #007700">();<br /></span><span style="color: #0000BB">$result </span><span style="color: #007700">= </span><span style="color: #0000BB">yaz_es_result</span><span style="color: #007700">(</span><span style="color: #0000BB">$id</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?></span> </span> </code></div> </div> </div> </div> <div class="refsect1 seealso" id="refsect1-function.yaz-es-seealso"> <h3 class="title">See Also</h3> <p class="para"> <ul class="simplelist"> <li class="member"> <span class="function"><a href="function.yaz-es-result.html" class="function" rel="rdfs-seeAlso">yaz_es_result()</a> - Inspects Extended Services Result</span></li> </ul> </p> </div> </div><hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.yaz-es-result.html">yaz_es_result</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.yaz-get-option.html">yaz_get_option</a></div> <div class="up"><a href="ref.yaz.html">YAZ Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>