<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/yar.setup.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'zh',
  ),
  'this' => 
  array (
    0 => 'yar.configuration.php',
    1 => '运行时配置',
    2 => '运行时配置',
  ),
  'up' => 
  array (
    0 => 'yar.setup.php',
    1 => '安装/配置',
  ),
  'prev' => 
  array (
    0 => 'yar.installation.php',
    1 => '安装',
  ),
  'next' => 
  array (
    0 => 'yar.resources.php',
    1 => '资源类型',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'zh',
    'path' => 'reference/yar/ini.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="yar.configuration" class="section">
 <h2 class="title">运行时配置</h2>
 <p class="simpara">
这些函数的行为受 <var class="filename">php.ini</var> 中的设置影响。
</p>
 <p class="para">
  <table class="doctable table">
   <caption><strong>Yar 配置选项</strong></caption>
   
    <thead>
     <tr>
      <th>名字</th>
      <th>默认</th>
      <th>可修改范围</th>
      <th>更新日志</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td><a href="yar.configuration.php#ini.yar.connect-timeout" class="link">yar.connect_timeout</a></td>
      <td>1000</td>
      <td><strong><code><a href="info.constants.php#constant.ini-all">INI_ALL</a></code></strong></td>
      <td class="empty">&nbsp;</td>
     </tr>

     <tr>
      <td><a href="yar.configuration.php#ini.yar.content-type" class="link">yar.content_type</a></td>
      <td>application/octet-stream</td>
      <td><strong><code><a href="info.constants.php#constant.ini-all">INI_ALL</a></code></strong></td>
      <td class="empty">&nbsp;</td>
     </tr>

     <tr>
      <td><a href="yar.configuration.php#ini.yar.debug" class="link">yar.debug</a></td>
      <td>Off</td>
      <td><strong><code><a href="info.constants.php#constant.ini-all">INI_ALL</a></code></strong></td>
      <td class="empty">&nbsp;</td>
     </tr>

     <tr>
      <td><a href="yar.configuration.php#ini.yar.expose-info" class="link">yar.expose_info</a></td>
      <td>On</td>
      <td><strong><code><a href="info.constants.php#constant.ini-perdir">INI_PERDIR</a></code></strong></td>
      <td class="empty">&nbsp;</td>
     </tr>

     <tr>
      <td><a href="yar.configuration.php#ini.yar.packager" class="link">yar.packager</a></td>
      <td>php</td>
      <td><strong><code><a href="info.constants.php#constant.ini-perdir">INI_PERDIR</a></code></strong></td>
      <td class="empty">&nbsp;</td>
     </tr>

     <tr>
      <td><a href="yar.configuration.php#ini.yar.ssl-verify" class="link">yar.ssl_verify</a></td>
      <td>Off</td>
      <td><strong><code><a href="info.constants.php#constant.ini-all">INI_ALL</a></code></strong></td>
      <td class="empty">&nbsp;</td>
     </tr>

     <tr>
      <td><a href="yar.configuration.php#ini.yar.timeout" class="link">yar.timeout</a></td>
      <td>5000</td>
      <td><strong><code><a href="info.constants.php#constant.ini-all">INI_ALL</a></code></strong></td>
      <td class="empty">&nbsp;</td>
     </tr>

    </tbody>
   
  </table>

 </p>

 <p class="simpara">这是配置指令的简短说明。</p>

 <p class="para">
  <dl>
   
     <dt id="ini.yar.connect-timeout">
      <code class="parameter">yar.connect_timeout</code>
      <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
     </dt>
     <dd>
      <p class="simpara">
       通过 <span class="classname"><a href="class.yar-client.php" class="classname">Yar_Client</a></span> 和
       <span class="classname"><a href="class.yar-concurrent-client.php" class="classname">Yar_Concurrent_Client</a></span> 发起 HTTP
       调用时的连接超时时间，单位为毫秒。
      </p>
      <blockquote class="note"><p><strong class="note">注意</strong>: 
       <p class="simpara">
        该值以毫秒为单位。在 Yar 1.2.1
        之前，它以秒为单位（默认值为
        <code class="literal">1</code>）。
       </p>
      </p></blockquote>
     </dd>
    
    
     <dt id="ini.yar.content-type">
      <code class="parameter">yar.content_type</code>
      <span class="type"><a href="language.types.string.php" class="type string">string</a></span>
     </dt>
     <dd>
      <p class="simpara">
       <span class="classname"><a href="class.yar-server.php" class="classname">Yar_Server</a></span> 发送的
       <code class="literal">Content-Type</code> 响应头的值。Yar
       使用二进制协议，因此默认值为
       <code class="literal">application/octet-stream</code>。
      </p>
     </dd>
    
    
     <dt id="ini.yar.debug">
      <code class="parameter">yar.debug</code>
      <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span>
     </dt>
     <dd>
      <p class="simpara">
       启用调试模式。开启后，Yar 会为每一个请求和响应输出带有协议级细节的
       <strong><code><a href="errorfunc.constants.php#constant.e-warning">E_WARNING</a></code></strong> 消息，并以
       <code class="literal">[Debug Yar_Server]</code> 或
       <code class="literal">[Debug Yar_Client]</code> 前缀以及时间戳开头。
      </p>
     </dd>
    
    
     <dt id="ini.yar.expose-info">
      <code class="parameter">yar.expose_info</code>
      <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span>
     </dt>
     <dd>
      <p class="simpara">
       对于非 POST（通常是 GET）请求，
       <span class="methodname"><a href="yar-server.handle.php" class="methodname">Yar_Server::handle()</a></span> 是否输出服务信息页面。
       当此配置项关闭时，这类请求会抛出
       <span class="exceptionname"><a href="class.yar-server-exception.php" class="exceptionname">Yar_Server_Exception</a></span> 异常。
      </p>
     </dd>
    
    
     <dt id="ini.yar.packager">
      <code class="parameter">yar.packager</code>
      <span class="type"><a href="language.types.string.php" class="type string">string</a></span>
     </dt>
     <dd>
      <p class="simpara">
       用于序列化请求体和响应体的默认打包器。可用的值有
       <code class="literal">php</code>（PHP
       序列化）、<code class="literal">json</code>，以及
       <code class="literal">msgpack</code>（仅当 Yar 使用
       <strong class="option configure">--enable-msgpack</strong> 编译时可用）。
      </p>
      <p class="simpara">
       当 Yar 编译时启用了 msgpack 支持，默认值变为
       <code class="literal">msgpack</code>。
      </p>
      <p class="simpara">
       该值可以在客户端通过
       <strong><code><a href="yar.constants.php#constant.yar-opt-packager">YAR_OPT_PACKAGER</a></code></strong> 选项按客户端单独覆盖。
      </p>
     </dd>
    
    
     <dt id="ini.yar.ssl-verify">
      <code class="parameter">yar.ssl_verify</code>
      <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span>
     </dt>
     <dd>
      <p class="simpara">
       是否验证 HTTPS 服务器的 TLS 证书。开启后，
       curl 传输方式会设置
       <strong><code><a href="curl.constants.php#constant.curlopt-ssl-verifypeer">CURLOPT_SSL_VERIFYPEER</a></code></strong> 和
       <strong><code><a href="curl.constants.php#constant.curlopt-ssl-verifyhost">CURLOPT_SSL_VERIFYHOST</a></code></strong>，
       指向证书无效的服务器的请求将会失败。
       出于向后兼容的考虑，默认关闭。自 Yar 2.4.0 起可用。
      </p>
     </dd>
    
    
     <dt id="ini.yar.timeout">
      <code class="parameter">yar.timeout</code>
      <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
     </dt>
     <dd>
      <p class="simpara">
       通过 <span class="classname"><a href="class.yar-client.php" class="classname">Yar_Client</a></span> 和
       <span class="classname"><a href="class.yar-concurrent-client.php" class="classname">Yar_Concurrent_Client</a></span> 发起 RPC
       调用时的超时时间，单位为毫秒。
      </p>
     </dd>
    

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