<!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>Sets one or more options for connection</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.yaz-search.html">yaz_search</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.yaz-sort.html">yaz_sort</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-set-option" class="refentry"> <div class="refnamediv"> <h1 class="refname">yaz_set_option</h1> <p class="verinfo">(PECL yaz >= 0.9.0)</p><p class="refpurpose"><span class="refname">yaz_set_option</span> — <span class="dc-title">Sets one or more options for connection</span></p> </div> <div class="refsect1 description" id="refsect1-function.yaz-set-option-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_set_option</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">$name</code></span> , <span class="methodparam"><span class="type">string</span> <code class="parameter">$value</code></span> )</div> <div class="methodsynopsis dc-description"> <span class="type"><span class="type void">void</span></span> <span class="methodname"><strong>yaz_set_option</strong></span> ( <span class="methodparam"><span class="type">resource</span> <code class="parameter">$id</code></span> , <span class="methodparam"><span class="type">array</span> <code class="parameter">$options</code></span> )</div> <p class="para rdfs-comment"> Sets one or more options on the given connection. </p> </div> <div class="refsect1 parameters" id="refsect1-function.yaz-set-option-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">name</code></em> or <em><code class="parameter">options</code></em></span> <dd> <p class="para"> May be either a string or an array. </p> <p class="para"> If given as a string, this will be the name of the option to set. You'll need to give it's <em><code class="parameter">value</code></em>. </p> <p class="para"> If given as an array, this will be an associative array (option name => option value). </p> <table class="doctable table"> <caption><strong>PHP/YAZ Connection Options</strong></caption> <col width="2*" /> <col width="5*" /> <thead> <tr> <th>Name</th> <th>Description</th> </tr> </thead> <tbody class="tbody"> <tr> <td>implementationName</td> <td>implementation name of server</td> </tr> <tr> <td>implementationVersion</td> <td>implementation version of server</td> </tr> <tr> <td>implementationId</td> <td>implementation ID of server</td> </tr> <tr> <td>schema</td> <td> schema for retrieval. By default, no schema is used. Setting this option is equivalent to using function <span class="function"><a href="function.yaz-schema.html" class="function">yaz_schema()</a></span> </td> </tr> <tr> <td>preferredRecordSyntax</td> <td> record syntax for retrieval. By default, no syntax is used. Setting this option is equivalent to using function <span class="function"><a href="function.yaz-syntax.html" class="function">yaz_syntax()</a></span> </td> </tr> <tr> <td>start</td> <td> offset for first record to be retrieved via <span class="function"><a href="function.yaz-search.html" class="function">yaz_search()</a></span> or <span class="function"><a href="function.yaz-present.html" class="function">yaz_present()</a></span>. First record is numbered has a start value of 0. Second record has start value 1. Setting this option in combination with option <em>count</em> has the same effect as calling <span class="function"><a href="function.yaz-range.html" class="function">yaz_range()</a></span> except that records are numbered from 1 in <span class="function"><a href="function.yaz-range.html" class="function">yaz_range()</a></span> </td> </tr> <tr> <td>count</td> <td>maximum number of records to be retrieved via <span class="function"><a href="function.yaz-search.html" class="function">yaz_search()</a></span> or <span class="function"><a href="function.yaz-present.html" class="function">yaz_present()</a></span>. </td> </tr> <tr> <td>elementSetName</td> <td>element-set-name for retrieval. Setting this option is equivalent to calling <span class="function"><a href="function.yaz-element.html" class="function">yaz_element()</a></span>. </td> </tr> </tbody> </table> </dd> </dt> <dt> <span class="term"><em><code class="parameter">value</code></em></span> <dd> <p class="para"> The new value of the option. Use this only if the previous argument is a string. </p> </dd> </dt> </dl> </p> </div> <div class="refsect1 returnvalues" id="refsect1-function.yaz-set-option-returnvalues"> <h3 class="title">Return Values</h3> <p class="para"> No value is returned. </p> </div> </div><hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.yaz-search.html">yaz_search</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.yaz-sort.html">yaz_sort</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>