<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/book.intl.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'zh',
  ),
  'this' => 
  array (
    0 => 'class.intllistformatter.php',
    1 => 'IntlListFormatter',
    2 => 'The IntlListFormatter class',
  ),
  'up' => 
  array (
    0 => 'book.intl.php',
    1 => 'intl',
  ),
  'prev' => 
  array (
    0 => 'intldatepatterngenerator.getbestpattern.php',
    1 => 'IntlDatePatternGenerator::getBestPattern',
  ),
  'next' => 
  array (
    0 => 'intllistformatter.construct.php',
    1 => 'IntlListFormatter::__construct',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/intl/intllistformatter.xml',
  ),
  'history' => 
  array (
  ),
  'extra_header_links' => 
  array (
    'rel' => 'alternate',
    'href' => '/manual/en/feeds/class.intllistformatter.atom',
    'type' => 'application/atom+xml',
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="class.intllistformatter" class="reference">
 <h1 class="title">The IntlListFormatter class</h1>
 

 <div class="partintro"><p class="verinfo">(No version information available, might only be in Git)</p>

  
  <div class="section" id="intllistformatter.intro">
   <h2 class="title">简介</h2>
   <p class="simpara">
    Formats, orders, and punctuates a list of items according to locale-specific rules.
    Requires ICU 67 or later.
   </p>
  </div>
  

  <div class="section" id="intllistformatter.synopsis">
   <h2 class="title">类摘要</h2>

   
   <div class="classsynopsis"><div class="classsynopsisinfo">
    
     <span class="modifier">class</span> <strong class="classname"><strong class="classname">IntlListFormatter</strong></strong>
     {</div>

    <div class="classsynopsisinfo classsynopsisinfo_comment">/* 常量 */</div>
    <div class="fieldsynopsis">
     <span class="modifier">public</span>
     <span class="modifier">const</span>
     <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
      <var class="fieldsynopsis_varname"><a href="class.intllistformatter.php#intllistformatter.constants.type-and"><var class="varname">TYPE_AND</var></a></var>;</div>

    <div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="modifier">const</span>
     <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
      <var class="fieldsynopsis_varname"><a href="class.intllistformatter.php#intllistformatter.constants.type-or"><var class="varname">TYPE_OR</var></a></var>;</div>

    <div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="modifier">const</span>
     <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
      <var class="fieldsynopsis_varname"><a href="class.intllistformatter.php#intllistformatter.constants.type-units"><var class="varname">TYPE_UNITS</var></a></var>;</div>

    <div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="modifier">const</span>
     <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
      <var class="fieldsynopsis_varname"><a href="class.intllistformatter.php#intllistformatter.constants.width-wide"><var class="varname">WIDTH_WIDE</var></a></var>;</div>

    <div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="modifier">const</span>
     <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
      <var class="fieldsynopsis_varname"><a href="class.intllistformatter.php#intllistformatter.constants.width-short"><var class="varname">WIDTH_SHORT</var></a></var>;</div>

    <div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="modifier">const</span>
     <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
      <var class="fieldsynopsis_varname"><a href="class.intllistformatter.php#intllistformatter.constants.width-narrow"><var class="varname">WIDTH_NARROW</var></a></var>;</div>


    <div class="classsynopsisinfo classsynopsisinfo_comment">/* 方法 */</div>
    <div class="constructorsynopsis dc-description">
   <span class="modifier">public</span> <span class="modifier">function</span> <span class="methodname"><a href="intllistformatter.construct.php" class="methodname">__construct</a></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$locale</code></span>, <span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$type</code><span class="initializer"> = <strong><code><a href="class.intllistformatter.php#intllistformatter.constants.type-and">IntlListFormatter::TYPE_AND</a></code></strong></span></span>, <span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$width</code><span class="initializer"> = <strong><code><a href="class.intllistformatter.php#intllistformatter.constants.width-wide">IntlListFormatter::WIDTH_WIDE</a></code></strong></span></span>)</div>

    <div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="modifier">function</span> <span class="methodname"><a href="intllistformatter.format.php" class="methodname">format</a></span>(<span class="methodparam"><span class="type"><a href="language.types.array.php" class="type array">array</a></span> <code class="parameter">$list</code></span>): <span class="type"><span class="type"><a href="language.types.string.php" class="type string">string</a></span>|<span class="type"><a href="language.types.singleton.php" class="type false">false</a></span></span></div>

   }</div>
   

  </div>

  <div class="section" id="intllistformatter.constants">
   <h2 class="title">预定义常量</h2>
   <dl>
    
     <dt id="intllistformatter.constants.type-and"><strong><code><a href="class.intllistformatter.php#intllistformatter.constants.type-and">IntlListFormatter::TYPE_AND</a></code></strong></dt>
     <dd>
      <span class="simpara">
       Formats a list using conjunction (e.g. &quot;A, B, and C&quot;).
      </span>
     </dd>
    
    
     <dt id="intllistformatter.constants.type-or"><strong><code><a href="class.intllistformatter.php#intllistformatter.constants.type-or">IntlListFormatter::TYPE_OR</a></code></strong></dt>
     <dd>
      <span class="simpara">
       Formats a list using disjunction (e.g. &quot;A, B, or C&quot;).
      </span>
     </dd>
    
    
     <dt id="intllistformatter.constants.type-units"><strong><code><a href="class.intllistformatter.php#intllistformatter.constants.type-units">IntlListFormatter::TYPE_UNITS</a></code></strong></dt>
     <dd>
      <span class="simpara">
       Formats a list of units (e.g. &quot;3 ft, 7 in&quot;).
      </span>
     </dd>
    
    
     <dt id="intllistformatter.constants.width-wide"><strong><code><a href="class.intllistformatter.php#intllistformatter.constants.width-wide">IntlListFormatter::WIDTH_WIDE</a></code></strong></dt>
     <dd>
      <span class="simpara">
       Uses the widest (most verbose) list format, typically with conjunctions spelled out in full.
      </span>
     </dd>
    
    
     <dt id="intllistformatter.constants.width-short"><strong><code><a href="class.intllistformatter.php#intllistformatter.constants.width-short">IntlListFormatter::WIDTH_SHORT</a></code></strong></dt>
     <dd>
      <span class="simpara">
       Uses a short list format, typically using abbreviations.
      </span>
     </dd>
    
    
     <dt id="intllistformatter.constants.width-narrow"><strong><code><a href="class.intllistformatter.php#intllistformatter.constants.width-narrow">IntlListFormatter::WIDTH_NARROW</a></code></strong></dt>
     <dd>
      <span class="simpara">
       Uses the narrowest list format, with minimal punctuation.
      </span>
     </dd>
    
   </dl>
  </div>

  <div class="section" id="intllistformatter.changelog">
   <h2 class="title">更新日志</h2>
   <table class="doctable informaltable">
    
     <thead>
      <tr>
       <th>版本</th>
       <th>说明</th>
      </tr>

     </thead>

     <tbody class="tbody">
      <tr>
       <td>8.5.0</td>
       <td>
        The class was added.
       </td>
      </tr>

     </tbody>
    
   </table>

  </div>

 </div>

 










<h2>目录</h2><ul class="chunklist chunklist_reference"><li><a href="intllistformatter.construct.php">IntlListFormatter::__construct</a> — Creates a new IntlListFormatter instance</li><li><a href="intllistformatter.format.php">IntlListFormatter::format</a> — Format a list of items</li></ul>
</div>
<?php manual_footer($setup); ?>