Files
smarty/docs/ja/programmers/api-variables/variable-plugins-dir.xml

81 lines
2.6 KiB
XML
Raw Normal View History

2007-04-21 12:13:34 +00:00
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 2600 Maintainer: takagi Status: ready -->
2007-04-21 12:13:34 +00:00
<!-- CREDITS: mat-sh,daichi,joe -->
<sect1 id="variable.plugins.dir">
<title>$plugins_dir</title>
<para>
Smartyが必要とするプラグインを置くディレクトリです。デフォルトは
<link linkend="constant.smarty.dir"><constant>SMARTY_DIR</constant></link>
直下の <filename class="directory">plugins/</filename> です。
相対パスが指定された場合は、まず最初に
<link linkend="constant.smarty.dir"><constant>SMARTY_DIR</constant></link>
直下を見ます。そこで見つからなかった場合は、
次にカレントディレクトリ、PHPのinclude_pathの順で見ていきます。
<parameter>$plugins_dir</parameter>
がディレクトリ名の配列であった場合、Smarty
は各プラグインディレクトリを
<emphasis role="bold">与えられた順に</emphasis> 検索します。
</para>
<note>
<title>テクニカルノート</title>
<para>
パフォーマンスを確保するため、<parameter>$plugins_dir</parameter>
には PHP のインクルードパスを使用しないでください。絶対パスを使用するか、
<constant>SMARTY_DIR</constant> あるいはカレントディレクトリからの相対パスを使用してください。
</para>
</note>
<example>
<title>ローカルのプラグインディレクトリの追加</title>
<programlisting role="php">
<![CDATA[
<?php
$smarty->plugins_dir[] = 'includes/my_smarty_plugins';
?>
]]>
</programlisting>
</example>
<example>
<title>複数の $plugins_dir</title>
<programlisting role="php">
<![CDATA[
<?php
$smarty->plugins_dir = array(
'plugins', // デフォルトは SMARTY_DIR の配下
'/path/to/shared/plugins',
'../../includes/my/plugins'
);
?>
]]>
</programlisting>
</example>
</sect1>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->