<?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 => 'en',
  ),
  'this' => 
  array (
    0 => 'yaf.configuration.php',
    1 => 'Runtime Configuration',
    2 => 'Runtime Configuration',
  ),
  'up' => 
  array (
    0 => 'yaf.setup.php',
    1 => 'Installing/Configuring',
  ),
  'prev' => 
  array (
    0 => 'yaf.installation.php',
    1 => 'Installation',
  ),
  'next' => 
  array (
    0 => 'yaf.constants.php',
    1 => 'Predefined Constants',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    '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">Runtime Configuration</h2>
 <p class="simpara">
The behaviour of these functions is affected by settings in <var class="filename">php.ini</var>.
</p>
 <p class="para">
  <table class="doctable table">
   <caption><strong>Yaf Configure Options</strong></caption>
   
    <thead>
     <tr>
      <th>Name</th>
      <th>Default</th>
      <th>Changeable</th>
      <th>Changelog</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td><a href="yaf.configuration.php#ini.yaf.library" class="link">yaf.library</a></td>
      <td>&quot;&quot;</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="yaf.configuration.php#ini.yaf.environ" class="link">yaf.environ</a></td>
      <td>&quot;product&quot;</td>
      <td><strong><code><a href="info.constants.php#constant.ini-system">INI_SYSTEM</a></code></strong></td>
      <td class="empty">&nbsp;</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 class="empty">&nbsp;</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-all">INI_ALL</a></code></strong></td>
      <td class="empty">&nbsp;</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 class="empty">&nbsp;</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 class="empty">&nbsp;</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 class="empty">&nbsp;</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 class="empty">&nbsp;</td>
     </tr>

     <tr>
      <td><a href="yaf.configuration.php#ini.yaf.name-separator" class="link">yaf.name_separator</a></td>
      <td>&quot;&quot;</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">Here&#039;s a short explanation of
the configuration directives.</p>

 <p class="para">
  <blockquote class="note"><p><strong class="note">Note</strong>: 
   <p class="simpara">
    The <code class="literal">yaf.cache_config</code> directive existed in Yaf 2.x,
    where it cached the parsed result of the INI configuration file within
    the PHP process. It was removed in Yaf 3.0.0 and is no longer
    recognized.
   </p>
  </p></blockquote>
 </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="simpara">
       The global library directory. <span class="classname"><a href="class.yaf-loader.php" class="classname">Yaf_Loader</a></span>
       searches this directory for classes that can not be found in the
       application&#039;s local library (see
       <a href="yaf.appconfig.php#configuration.yaf.library" class="link">application.library</a>).
      </p>
      <p class="simpara">
       See also <span class="methodname"><a href="yaf-loader.getlibrarypath.php" class="methodname">Yaf_Loader::getLibraryPath()</a></span> and
       <span class="methodname"><a href="yaf-loader.setlibrarypath.php" class="methodname">Yaf_Loader::setLibraryPath()</a></span>.
      </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="simpara">
       The environment name, <code class="literal">&quot;product&quot;</code> by default. It is
       used by <span class="classname"><a href="class.yaf-application.php" class="classname">Yaf_Application</a></span> to pick the section of
       the INI configuration file (its first constructor argument) that
       becomes the application configuration.
      </p>
      <p class="simpara">
       For example, if this value is <code class="literal">&quot;product&quot;</code>, Yaf will
       use the section named <code class="literal">[product]</code> in the INI
       configuration file as the final configuration of the
       <span class="classname"><a href="class.yaf-application.php" class="classname">Yaf_Application</a></span>. The environment name can also
       be overridden per application by passing the second constructor
       argument to <span class="methodname"><a href="yaf-application.construct.php" class="methodname">Yaf_Application::__construct()</a></span>.
      </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="simpara">
       The maximum number of times
       <span class="methodname"><a href="yaf-controller-abstract.forward.php" class="methodname">Yaf_Controller_Abstract::forward()</a></span> can be
       chained in a single request, <code class="literal">5</code> by default.
      </p>
      <p class="simpara">
       This is a protection against recursive
       <span class="methodname"><a href="yaf-controller-abstract.forward.php" class="methodname">Yaf_Controller_Abstract::forward()</a></span> loops; when
       the limit is exceeded, a <span class="classname"><a href="class.yaf-exception-dispatchfailed.php" class="classname">Yaf_Exception_DispatchFailed</a></span>
       is thrown. Non-positive values are clamped to the default.
      </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="simpara">
       When enabled, all classes declared by Yaf are named in namespace
       style:
      </p>
      <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>
      <p class="simpara">
       There is an exception for classes whose last component is a reserved
       keyword of PHP and thus cannot be used as a class name; such classes
       keep the underscore in their last component:
      </p>
      <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>
      <blockquote class="note"><p><strong class="note">Note</strong>: 
       <p class="simpara">
        Only one of the two naming styles is registered when the extension
        starts, so this directive must be set before the extension is
        loaded; it can not be toggled per request in any meaningful way.
       </p>
      </p></blockquote>
     </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="simpara">
       When there is only one part in the <code class="literal">PATH_INFO</code>,
       decides whether it should be considered as a controller name or as an
       action name.
      </p>
      <p class="simpara">
       If this configure is on, the single segment is considered as an
       action name, and the controller name falls back to the default
       controller; otherwise it is considered as a controller name.
      </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="simpara">
       Whether to lowercase all path components during class autoloading.
      </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="simpara">
       When this value is on, if <span class="classname"><a href="class.yaf-loader.php" class="classname">Yaf_Loader</a></span> can not
       find a class, it will return <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong>, giving other autoload functions
       a chance to be called.
      </p>
      <p class="simpara">
       When this value is off (the default), if
       <span class="classname"><a href="class.yaf-loader.php" class="classname">Yaf_Loader</a></span> can not find a class, it will
       return <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong>, and the class autoloading fails immediately:
       <span class="methodname"><a href="yaf-loader.autoload.php" class="methodname">Yaf_Loader::autoload()</a></span> always returns <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong>
       in that mode.
      </p>
      <blockquote class="note"><p><strong class="note">Note</strong>: 
       <p class="simpara">
        Yaf registers its loader during the instantiation of a
        <span class="classname"><a href="class.yaf-application.php" class="classname">Yaf_Application</a></span>, so any other autoloaders
        registered before the instantiation will be called before
        <span class="methodname"><a href="yaf-loader.autoload.php" class="methodname">Yaf_Loader::autoload()</a></span>.
       </p>
      </p></blockquote>
     </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="simpara">
       When this is on (the default), <span class="classname"><a href="class.yaf-loader.php" class="classname">Yaf_Loader</a></span>
       identifies an MVC class by its suffix to decide whether it is a
       controller or an action class: <code class="literal">IndexController</code>,
       <code class="literal">IndexAction</code>.
      </p>
      <p class="simpara">
       When this is off, <span class="classname"><a href="class.yaf-loader.php" class="classname">Yaf_Loader</a></span> looks at the
       prefix of the class name instead:
       <code class="literal">Controller_Index</code>, <code class="literal">Action_Index</code>.
      </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="simpara">
       When this is not empty, <span class="classname"><a href="class.yaf-loader.php" class="classname">Yaf_Loader</a></span> identifies
       MVC classes by this separator instead of the underscore that
       separates the name and the MVC suffix.
      </p>
      <p class="simpara">
       For example, when this value is <code class="literal">&quot;_&quot;</code> and
       <a href="yaf.configuration.php#ini.yaf.name-suffix" class="link">yaf.name_suffix</a> is on,
       <span class="classname"><a href="class.yaf-loader.php" class="classname">Yaf_Loader</a></span> will take
       <code class="literal">Index_Controller</code> as a controller class, while
       <code class="literal">IndexController</code> is considered a normal class.
       When it is empty (the default), the underscore is used.
      </p>
     </dd>
    
  </dl>
 </p>
</div><?php manual_footer($setup); ?>