<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/refs.basic.other.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'ja',
  ),
  'this' => 
  array (
    0 => 'book.yaconf.php',
    1 => 'Yaconf',
    2 => 'Yaconf',
  ),
  'up' => 
  array (
    0 => 'refs.basic.other.php',
    1 => 'その他の基本モジュール',
  ),
  'prev' => 
  array (
    0 => 'class.yaf-exception-loadfailed-view.php',
    1 => 'Yaf_Exception_LoadFailed_View',
  ),
  'next' => 
  array (
    0 => 'yaconf.setup.php',
    1 => 'インストール/設定',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'ja',
    'path' => 'reference/yaconf/book.xml',
  ),
  'history' => 
  array (
  ),
  'extra_header_links' => 
  array (
    'rel' => 'alternate',
    'href' => '/manual/en/feeds/book.yaconf.atom',
    'type' => 'application/atom+xml',
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="book.yaconf" class="book">
 
 <h1 class="title">Yaconf</h1>
 

 <div id="intro.yaconf" class="preface">
  <h1 class="title">はじめに</h1>
  <p class="para">
   <code class="literal">Yet Another Configurations Container</code>
   (<abbr>Yaconf</abbr>) は、設定コンテナです。
   これは <code class="literal">INI</code> ファイルをパースし、
   PHP の実行が始まるタイミングで結果を格納します。
   この結果は、PHP のライフサイクル全体で利用できます。
  </p>
  <p class="para">
   Yaconf は、全ての設定をインターン化された文字列か、
   変更不能な配列として格納します。
   つまり、これらの設定はリファレンスカウントの対象にならないため、
   <abbr>Yaconf</abbr> から設定を取得する際にコピーが発生せず、とても高速です。
  </p>
  <p class="para">
   Yaconf は、<code class="literal">INI</code> ファイル内でセクションやセクションの継承をサポートしています。
   PHP が non-ZTS としてビルドされている場合、
   Yaconf は <code class="literal">INI</code> ファイルが変更された後に、自動的に設定をリロードする機能をサポートしています。
  </p>
  <p class="para">
   Yaconf を動かすには、PHP 7.0 以降が必要です。
  </p>
  <div class="example" id="example-1">
   <p><strong>例1 INI ファイルの例</strong></p>
   <div class="example-contents">
<div class="inicode"><pre class="inicode">;Simple key val
key=val

;Hash
hash.a=val

;Array
arr.0=val
;or
arr[]=val

;PHP constants
version=PHP_VERSION

;Environment variable
env=${PATH}</pre>
</div>
   </div>

  </div>
  <div class="example" id="example-2">
   <p><strong>例2 INI セクションの例</strong></p>
   <div class="example-contents">
<div class="inicode"><pre class="inicode">[SectionA]
key=val
hash.a=val

;SectionB inherits SectionA
[SectionB:SectionA]
key=new_val                  ;override configuration key in SectionA</pre>
</div>
   </div>

  </div>
 </div>

 








 







<ul class="chunklist chunklist_book"><li><a href="yaconf.setup.php">インストール/設定</a><ul class="chunklist chunklist_book chunklist_children"><li><a href="yaconf.requirements.php">要件</a></li><li><a href="yaconf.installation.php">インストール手順</a></li><li><a href="yaconf.configuration.php">実行時設定</a></li><li><a href="yaconf.resources.php">リソース型</a></li></ul></li><li><a href="class.yaconf.php">Yaconf</a> — The Yaconf class<ul class="chunklist chunklist_book chunklist_children"><li><a href="yaconf.get.php">Yaconf::get</a> — Retrieve a item</li><li><a href="yaconf.has.php">Yaconf::has</a> — Determine if a item exists</li></ul></li></ul></div><?php manual_footer($setup); ?>