<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/book.yar.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'uk',
  ),
  'this' => 
  array (
    0 => 'yar.constants.php',
    1 => 'Попередньо визначені константи',
    2 => 'Попередньо визначені константи',
  ),
  'up' => 
  array (
    0 => 'book.yar.php',
    1 => 'Yar',
  ),
  'prev' => 
  array (
    0 => 'yar.resources.php',
    1 => 'Типи ресурсів',
  ),
  'next' => 
  array (
    0 => 'yar.examples.php',
    1 => 'Приклади',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/yar/constants.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="yar.constants" class="appendix">
 <h1 class="title">Попередньо визначені константи</h1>

 <p class="simpara">
Константи, описані нижче — визначені цим розширенням, тож доступні, коли
розширення скомпільовано як частина PHP або динамічно підключене під час
виконання.
</p>
 <dl>
  
   <dt id="constant.yar-version">
    <strong><code><a href="yar.constants.php#constant.yar-version">YAR_VERSION</a></code></strong>
    (<span class="type"><a href="language.types.string.php" class="type string">string</a></span>)
   </dt>
   <dd>
    <p class="simpara">
     The version of the Yar extension, e.g.
     <code class="literal">&quot;2.4.0&quot;</code>.
    </p>
   </dd>
  
  
   <dt id="constant.yar-has-msgpack">
    <strong><code><a href="yar.constants.php#constant.yar-has-msgpack">YAR_HAS_MSGPACK</a></code></strong>
    (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
   </dt>
   <dd>
    <p class="simpara">
     <code class="literal">1</code> when Yar was built with
     <strong class="option configure">--enable-msgpack</strong>, otherwise
     <code class="literal">0</code>.
    </p>
   </dd>
  
  
   <dt id="constant.yar-client-protocol-http">
    <strong><code><a href="yar.constants.php#constant.yar-client-protocol-http">YAR_CLIENT_PROTOCOL_HTTP</a></code></strong>
    (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
   </dt>
   <dd>
    <p class="simpara">
     Identifies the HTTP protocol, exposed through the read-only
     <var class="varname">_protocol</var> property of
     <span class="classname"><a href="class.yar-client.php" class="classname">Yar_Client</a></span>.
    </p>
   </dd>
  
  
   <dt id="constant.yar-client-protocol-tcp">
    <strong><code><a href="yar.constants.php#constant.yar-client-protocol-tcp">YAR_CLIENT_PROTOCOL_TCP</a></code></strong>
    (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
   </dt>
   <dd>
    <p class="simpara">
     Identifies the TCP protocol, exposed through the read-only
     <var class="varname">_protocol</var> property of
     <span class="classname"><a href="class.yar-client.php" class="classname">Yar_Client</a></span>.
    </p>
   </dd>
  
  
   <dt id="constant.yar-client-protocol-unix">
    <strong><code><a href="yar.constants.php#constant.yar-client-protocol-unix">YAR_CLIENT_PROTOCOL_UNIX</a></code></strong>
    (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
   </dt>
   <dd>
    <p class="simpara">
     Identifies the Unix socket protocol, exposed through the read-only
     <var class="varname">_protocol</var> property of
     <span class="classname"><a href="class.yar-client.php" class="classname">Yar_Client</a></span>.
    </p>
   </dd>
  
  
   <dt id="constant.yar-opt-packager">
    <strong><code><a href="yar.constants.php#constant.yar-opt-packager">YAR_OPT_PACKAGER</a></code></strong>
    (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
   </dt>
   <dd>
    <p class="simpara">
     Client option to override the
     <a href="yar.configuration.php#ini.yar.packager" class="link">yar.packager</a> directive
     for a single client. The value must be one of
     <code class="literal">php</code>, <code class="literal">json</code> or
     <code class="literal">msgpack</code>.
    </p>
   </dd>
  
  
   <dt id="constant.yar-opt-persistent">
    <strong><code><a href="yar.constants.php#constant.yar-opt-persistent">YAR_OPT_PERSISTENT</a></code></strong>
    (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
   </dt>
   <dd>
    <p class="simpara">
     Client option to enable persistent connections. When set to a
     truthy value, HTTP keep-alive is used so that repeated calls to
     the same server reuse the connection for the rest of the PHP
     request lifecycle.
    </p>
   </dd>
  
  
   <dt id="constant.yar-opt-timeout">
    <strong><code><a href="yar.constants.php#constant.yar-opt-timeout">YAR_OPT_TIMEOUT</a></code></strong>
    (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
   </dt>
   <dd>
    <p class="simpara">
     Client option to override the
     <a href="yar.configuration.php#ini.yar.timeout" class="link">yar.timeout</a> directive, in
     milliseconds.
    </p>
   </dd>
  
  
   <dt id="constant.yar-opt-connect-timeout">
    <strong><code><a href="yar.constants.php#constant.yar-opt-connect-timeout">YAR_OPT_CONNECT_TIMEOUT</a></code></strong>
    (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
   </dt>
   <dd>
    <p class="simpara">
     Client option to override the
     <a href="yar.configuration.php#ini.yar.connect-timeout" class="link">yar.connect_timeout</a>
     directive, in milliseconds.
    </p>
   </dd>
  
  
   <dt id="constant.yar-opt-header">
    <strong><code><a href="yar.constants.php#constant.yar-opt-header">YAR_OPT_HEADER</a></code></strong>
    (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
   </dt>
   <dd>
    <p class="simpara">
     Client option to add custom HTTP headers. The value must be an
     array of strings like
     <code class="literal">&quot;X-Custom: value&quot;</code>. Only effective with the
     HTTP and HTTPS protocols. Available as of Yar 2.0.4.
    </p>
   </dd>
  
  
   <dt id="constant.yar-opt-resolve">
    <strong><code><a href="yar.constants.php#constant.yar-opt-resolve">YAR_OPT_RESOLVE</a></code></strong>
    (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
   </dt>
   <dd>
    <p class="simpara">
     Client option to override hostname resolution for HTTP calls. The
     value must be an array of strings in the format
     <code class="literal">HOST:PORT:ADDRESS</code>, following the curl
     <strong><code><a href="curl.constants.php#constant.curlopt-resolve">CURLOPT_RESOLVE</a></code></strong> syntax. Requires libcurl
     &gt;= 7.21.3. Available as of Yar 2.1.0.
    </p>
   </dd>
  
  
   <dt id="constant.yar-opt-proxy">
    <strong><code><a href="yar.constants.php#constant.yar-opt-proxy">YAR_OPT_PROXY</a></code></strong>
    (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
   </dt>
   <dd>
    <p class="simpara">
     Client option to route HTTP calls through an HTTP proxy. The value
     must be a string such as <code class="literal">127.0.0.1:8888</code>.
     Available as of Yar 2.2.0.
    </p>
   </dd>
  
  
   <dt id="constant.yar-opt-provider">
    <strong><code><a href="yar.constants.php#constant.yar-opt-provider">YAR_OPT_PROVIDER</a></code></strong>
    (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
   </dt>
   <dd>
    <p class="simpara">
     Client option carrying the provider identity sent with every
     request. The value must be a string of at most 32 bytes, which is
     passed to the server-side <code class="literal">__auth</code> magic method.
     Available as of Yar 2.3.0.
    </p>
   </dd>
  
  
   <dt id="constant.yar-opt-token">
    <strong><code><a href="yar.constants.php#constant.yar-opt-token">YAR_OPT_TOKEN</a></code></strong>
    (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
   </dt>
   <dd>
    <p class="simpara">
     Client option carrying the authentication token sent with every
     request. The value must be a string of at most 32 bytes, which is
     passed to the server-side <code class="literal">__auth</code> magic method.
     Available as of Yar 2.3.0.
    </p>
   </dd>
  
  
   <dt id="constant.yar-packager-php">
    <strong><code><a href="yar.constants.php#constant.yar-packager-php">YAR_PACKAGER_PHP</a></code></strong>
    (<span class="type"><a href="language.types.string.php" class="type string">string</a></span>)
   </dt>
   <dd>
    <p class="simpara">
     The identifier of the <code class="literal">php</code> packager,
     <code class="literal">&quot;PHP&quot;</code>.
    </p>
   </dd>
  
  
   <dt id="constant.yar-packager-json">
    <strong><code><a href="yar.constants.php#constant.yar-packager-json">YAR_PACKAGER_JSON</a></code></strong>
    (<span class="type"><a href="language.types.string.php" class="type string">string</a></span>)
   </dt>
   <dd>
    <p class="simpara">
     The identifier of the <code class="literal">json</code> packager,
     <code class="literal">&quot;JSON&quot;</code>.
    </p>
   </dd>
  
  
   <dt id="constant.yar-packager-msgpack">
    <strong><code><a href="yar.constants.php#constant.yar-packager-msgpack">YAR_PACKAGER_MSGPACK</a></code></strong>
    (<span class="type"><a href="language.types.string.php" class="type string">string</a></span>)
   </dt>
   <dd>
    <p class="simpara">
     The identifier of the <code class="literal">msgpack</code> packager,
     <code class="literal">&quot;MSGPACK&quot;</code>.
    </p>
   </dd>
  
  
   <dt id="constant.yar-err-okey">
    <strong><code><a href="yar.constants.php#constant.yar-err-okey">YAR_ERR_OKEY</a></code></strong>
    (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
   </dt>
   <dd>
    <p class="simpara">
     No error; the request was processed successfully.
    </p>
   </dd>
  
  
   <dt id="constant.yar-err-packager">
    <strong><code><a href="yar.constants.php#constant.yar-err-packager">YAR_ERR_PACKAGER</a></code></strong>
    (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
   </dt>
   <dd>
    <p class="simpara">
     A packager error, e.g. a body that could not be unpacked.
    </p>
   </dd>
  
  
   <dt id="constant.yar-err-protocol">
    <strong><code><a href="yar.constants.php#constant.yar-err-protocol">YAR_ERR_PROTOCOL</a></code></strong>
    (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
   </dt>
   <dd>
    <p class="simpara">
     A protocol error, e.g. a malformed Yar header.
    </p>
   </dd>
  
  
   <dt id="constant.yar-err-request">
    <strong><code><a href="yar.constants.php#constant.yar-err-request">YAR_ERR_REQUEST</a></code></strong>
    (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
   </dt>
   <dd>
    <p class="simpara">
     A request error, e.g. a call to an undefined or non-public
     method.
    </p>
   </dd>
  
  
   <dt id="constant.yar-err-output">
    <strong><code><a href="yar.constants.php#constant.yar-err-output">YAR_ERR_OUTPUT</a></code></strong>
    (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
   </dt>
   <dd>
    <p class="simpara">
     An output error, e.g. the server could not start its output
     buffer.
    </p>
   </dd>
  
  
   <dt id="constant.yar-err-transport">
    <strong><code><a href="yar.constants.php#constant.yar-err-transport">YAR_ERR_TRANSPORT</a></code></strong>
    (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
   </dt>
   <dd>
    <p class="simpara">
     A transport error, e.g. a connection failure or timeout.
    </p>
   </dd>
  
  
   <dt id="constant.yar-err-exception">
    <strong><code><a href="yar.constants.php#constant.yar-err-exception">YAR_ERR_EXCEPTION</a></code></strong>
    (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
   </dt>
   <dd>
    <p class="simpara">
     The remote service threw an exception while processing the
     request.
    </p>
   </dd>
  
  
   <dt id="constant.yar-err-forbidden">
    <strong><code><a href="yar.constants.php#constant.yar-err-forbidden">YAR_ERR_FORBIDDEN</a></code></strong>
    (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
   </dt>
   <dd>
    <p class="simpara">
     The request was rejected by the server&#039;s authentication
     (see the <code class="literal">provider</code> and
     <code class="literal">token</code> fields of the
     <a href="yar.protocol.php" class="link">Yar protocol header</a>).
    </p>
   </dd>
  
 </dl>
</div>
<?php manual_footer($setup); ?>