<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.gearmanclient.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'en',
  ),
  'this' => 
  array (
    0 => 'gearmanclient.setcontext.php',
    1 => 'GearmanClient::setContext',
    2 => 'Set application context',
  ),
  'up' => 
  array (
    0 => 'class.gearmanclient.php',
    1 => 'GearmanClient',
  ),
  'prev' => 
  array (
    0 => 'gearmanclient.setcompletecallback.php',
    1 => 'GearmanClient::setCompleteCallback',
  ),
  'next' => 
  array (
    0 => 'gearmanclient.setcreatedcallback.php',
    1 => 'GearmanClient::setCreatedCallback',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/gearman/gearmanclient/setcontext.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="gearmanclient.setcontext" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">GearmanClient::setContext</h1>
  <p class="verinfo">(PECL gearman &gt;= 0.6.0)</p><p class="refpurpose"><span class="refname">GearmanClient::setContext</span> &mdash; <span class="dc-title">Set application context</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-gearmanclient.setcontext-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>GearmanClient::setContext</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$data</code></span>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>

  <p class="simpara">
   Sets an arbitrary string to provide application context that can
   later be retrieved by <span class="methodname"><a href="gearmanclient.context.php" class="methodname">GearmanClient::context()</a></span>.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-gearmanclient.setcontext-parameters">
  <h3 class="title">Parameters</h3>
  <dl>
   
    <dt><code class="parameter">data</code></dt>
    <dd>
     <span class="simpara">
      Arbitrary context data
     </span>
    </dd>
   
  </dl>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-gearmanclient.setcontext-returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="simpara">
   Always returns <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong>.
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-gearmanclient.setcontext-seealso">
  <h3 class="title">See Also</h3>
  <ul class="simplelist">
   <li><span class="methodname"><a href="gearmanclient.context.php" class="methodname" rel="rdfs-seeAlso">GearmanClient::context()</a> - Get the application context</span></li>
  </ul>
 </div>


</div><?php manual_footer($setup); ?>