<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/yaf.setup.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'ja',
  ),
  'this' => 
  array (
    0 => 'yaf.configuration.php',
    1 => '実行時設定',
    2 => '実行時設定',
  ),
  'up' => 
  array (
    0 => 'yaf.setup.php',
    1 => 'インストール/設定',
  ),
  'prev' => 
  array (
    0 => 'yaf.installation.php',
    1 => 'インストール手順',
  ),
  'next' => 
  array (
    0 => 'yaf.constants.php',
    1 => '定義済み定数',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'ja',
    'path' => 'reference/yaf/ini.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="yaf.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>Yaf 設定オプション</strong></caption>
   
    <thead>
     <tr>
      <th>名前</th>
      <th>デフォルト</th>
      <th>変更可能</th>
      <th>変更履歴</th>
     </tr>

    </thead>

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

     <tr>
      <td><a href="yaf.configuration.php#ini.yaf.action-prefer" class="link">yaf.action_prefer</a></td>
      <td>0</td>
      <td><strong><code><a href="info.constants.php#constant.ini-all">INI_ALL</a></code></strong></td>
      <td></td>
     </tr>

     <tr>
      <td><a href="yaf.configuration.php#ini.yaf.lowcase-path" class="link">yaf.lowcase_path</a></td>
      <td>0</td>
      <td><strong><code><a href="info.constants.php#constant.ini-all">INI_ALL</a></code></strong></td>
      <td></td>
     </tr>

     <tr>
      <td><a href="yaf.configuration.php#ini.yaf.use-spl-autoload" class="link">yaf.use_spl_autoload</a></td>
      <td>0</td>
      <td><strong><code><a href="info.constants.php#constant.ini-all">INI_ALL</a></code></strong></td>
      <td></td>
     </tr>

     <tr>
      <td><a href="yaf.configuration.php#ini.yaf.forward-limit" class="link">yaf.forward_limit</a></td>
      <td>5</td>
      <td><strong><code><a href="info.constants.php#constant.ini-all">INI_ALL</a></code></strong></td>
      <td></td>
     </tr>

     <tr>
      <td><a href="yaf.configuration.php#ini.yaf.name-suffix" class="link">yaf.name_suffix</a></td>
      <td>1</td>
      <td><strong><code><a href="info.constants.php#constant.ini-all">INI_ALL</a></code></strong></td>
      <td></td>
     </tr>

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

     <tr>
      <td><a href="yaf.configuration.php#ini.yaf.cache-config" class="link">yaf.cache_config</a></td>
      <td>0</td>
      <td><strong><code><a href="info.constants.php#constant.ini-system">INI_SYSTEM</a></code></strong></td>
      <td></td>
     </tr>

     <tr>
      <td><a href="yaf.configuration.php#ini.yaf.environ" class="link">yaf.environ</a></td>
      <td>product</td>
      <td><strong><code><a href="info.constants.php#constant.ini-system">INI_SYSTEM</a></code></strong></td>
      <td></td>
     </tr>

     <tr>
      <td><a href="yaf.configuration.php#ini.yaf.use-namespace" class="link">yaf.use_namespace</a></td>
      <td>0</td>
      <td><strong><code><a href="info.constants.php#constant.ini-system">INI_SYSTEM</a></code></strong></td>
      <td></td>
     </tr>

    </tbody>
   
  </table>

 </p>

 <p class="para">以下に設定ディレクティブに関する
簡単な説明を示します。</p>

 <p class="para">
  <dl>
   
     <dt id="ini.yaf.library">
      <code class="parameter">yaf.library</code>
      <span class="type"><a href="language.types.string.php" class="type string">string</a></span>
     </dt>
     <dd>
      <p class="para">
        グローバルライブラリパス。Yaf_loader は
        グローバルライブラリをこのディレクトリから探します。
      </p>
     </dd>
    
    
     <dt id="ini.yaf.action-prefer">
      <code class="parameter">yaf.action_prefer</code>
      <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
     </dt>
     <dd>
      <p class="para">
        PATH_INFO の要素がひとつだけだった場合に、
        それをコントローラとみなすかアクションとみなすか。
      </p>
      <p class="para">
        この設定を On にすると、アクション名とみなします。
      </p>
     </dd>
    
    
     <dt id="ini.yaf.lowcase-path">
      <code class="parameter">yaf.lowcase_path</code>
      <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
     </dt>
     <dd>
      <p class="para">
       クラスのオートロード時に、すべてのパスを小文字にするかどうか。
      </p>
     </dd>
    
    
     <dt id="ini.yaf.use-spl-autoload">
      <code class="parameter">yaf.use_spl_autoload</code>
      <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
     </dt>
     <dd>
      <p class="para">
        この値を On にすると、<span class="classname"><a href="class.yaf-loader.php" class="classname">Yaf_Loader</a></span>
        がクラスを見つけられなかったときに <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> を返し、
        その他のオートロード関数を呼べるようにします。
      </p>
      <p class="para">
        この値を Off にすると、<span class="classname"><a href="class.yaf-loader.php" class="classname">Yaf_Loader</a></span>
        がクラスを見つけられなかったときに <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> を返し、
        クラスのオートロードをそこで失敗させます。
      </p>
      <blockquote class="note"><p><strong class="note">注意</strong>: 
       <p class="para">
        Yaf がローダーを登録するのは
        <span class="classname"><a href="class.yaf-application.php" class="classname">Yaf_Application</a></span> のインスタンスを作るときです。
        なので、その前に登録されたオートローダーが呼ばれるのは
        <span class="methodname"><a href="yaf-loader.autoload.php" class="methodname">Yaf_Loader::autoload()</a></span> より前になります。
       </p>
      </p></blockquote>
      <p class="para">
        この値が Off (デフォルト) の場合、
        <span class="methodname"><a href="yaf-loader.autoload.php" class="methodname">Yaf_Loader::autoload()</a></span> は常に <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> を返します。
      </p>
     </dd>
    
    
     <dt id="ini.yaf.forward-limit">
      <code class="parameter">yaf.forward_limit</code>
      <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
     </dt>
     <dd>
      <p class="para">
        最大の転送回数で、デフォルトは 5。
        つまり、最大で 5 件まで転送スタックに積めるということです。
       </p>
      <p class="para">
       これは、
       <span class="methodname"><a href="yaf-controller-abstract.forward.php" class="methodname">Yaf_Controller_Abstract::forward()</a></span>
       の再帰を防ぐための保護です。
      </p>
     </dd>
    
    
     <dt id="ini.yaf.name-suffix">
      <code class="parameter">yaf.name_suffix</code>
      <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
     </dt>
     <dd>
      <p class="para">
       これを On にすると、Yaf_Loader はクラスのサフィックスを見て
       MVC クラスかどうかを判断します。
      </p>
      <p class="para">
       これが Off の場合は、Yaf_Loader はクラス名のプレフィックスを見ます。
      </p>
     </dd>
    
    
     <dt id="ini.yaf.name-separator">
      <code class="parameter">yaf.name_separator</code>
      <span class="type"><a href="language.types.string.php" class="type string">string</a></span>
     </dt>
     <dd>
      <p class="para">
       空の値以外を指定すると、Yaf_Loader はクラスのサフィックスを
       この文字列で判断します。
      </p>
      <p class="para">
       たとえば、この値を &quot;_&quot; にすると、Yaf_Loader は Index_Controller
       をコントローラクラスとみなし、IndexController は通常のクラスとみなします。
      </p>
     </dd>
    
    
     <dt id="ini.yaf.cache-config">
      <code class="parameter">yaf.cache_config</code>
      <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
     </dt>
     <dd>
      <p class="para">
        これを On にしているときに ini ファイルを
        <span class="methodname"><strong>Yaf_Application()</strong></span>
        のパラメータに使うと、ini ファイルのコンパイル結果を
        PHP プロセスにキャッシュします。
        <blockquote class="note"><p><strong class="note">注意</strong>: 
         <p class="para">
          Yaf は ini ファイルの最終更新時刻を調べ、
          前回のコンパイル以降に変更があった場合は読みなおします。
         </p>
        </p></blockquote>
        <div class="warning"><strong class="warning">警告</strong>
         <p class="para">
          Yaf は ini ファイルのパスをキャッシュエントリのキーとして使います。
          そのため、ini ファイルは絶対パスで指定しておきましょう。
          そうしないと、もし複数のアプリケーションが
          同じ相対パスに ini ファイルを持っていたときに、衝突が発生します。
         </p>
        </div>
      </p>
     </dd>
    
    
     <dt id="ini.yaf.environ">
      <code class="parameter">yaf.environ</code>
      <span class="type"><a href="language.types.string.php" class="type string">string</a></span>
     </dt>
     <dd>
      <p class="para">
        デフォルト値は &quot;product&quot; で、Yaf が ini ファイルのどのセクションを読み込むのかを指定します。
       </p>
       <p class="para">
        つまり、もしこの値が &quot;product&quot; なら、Yaf は ini ファイルの
        &quot;product&quot; セクションを読んで <span class="classname"><a href="class.yaf-application.php" class="classname">Yaf_Application</a></span>
        の最終設定をします。ini ファイルは <span class="classname"><a href="class.yaf-application.php" class="classname">Yaf_Application</a></span>
        への最初の引数で指定します。
      </p>
     </dd>
    

    
     <dt id="ini.yaf.use-namespace">
      <code class="parameter">yaf.use_namespace</code>
      <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>
     </dt>
     <dd>
      <p class="para">
       この値を On にすると、
       Yaf のすべてのクラスが名前空間形式になります。
      </p>
      <p class="para">
       たとえば
       <div class="example-contents screen">
        <div class="cdata"><pre>
Yaf_Route_Rewrite =&gt; \Yaf\Route\Rewrite
Yaf_Request_Http  =&gt; \Yaf\Request\Http
        </pre></div>
       </div>
       のようになります。ただ、
       <span class="classname"><a href="class.yaf-controller-abstract.php" class="classname">Yaf_Controller_Abstract</a></span>
       のような例外もあります。最後の部分が PHP の予約語と同じなので、
       クラス名として使うことができません。そんなクラスの場合は、次のようになります。
       <div class="example-contents screen">
        <div class="cdata"><pre>
Yaf_Controller_Abstract =&gt; \Yaf\Controller_Abstract
Yaf_Route_Static =&gt; \Yaf\Route_Static
        </pre></div>
       </div>
      </p>
     </dd>
    

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