File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" utf-8" ?>
22<!-- $Revision$ -->
3- <!-- EN-Revision: e51792efe0f103ec8724ad199524d7543610c978 Maintainer: haruki Status: ready -->
3+ <!-- EN-Revision: a38e360ae1ce4169b331013958c519d17f19114e Maintainer: haruki Status: ready -->
44<!-- Credits: hirokawa, haruki -->
55<sect1 xml : id =" install.unix.apache2" xmlns =" http://docbook.org/ns/docbook" xmlns : xlink =" http://www.w3.org/1999/xlink" >
66 <title >Apache 2.x (Unixシステム用)</title >
@@ -268,6 +268,34 @@ LoadModule php7_module modules/libphp7.so
268268 </programlisting >
269269 </informalexample >
270270
271+ <simpara >
272+ 他にハンドラが見つからないときのデフォルトのハンドラとして PHP ファイルを使いたい場合
273+ (ルーティングエンジンを使うときなど)は、<literal >FallbackResource</literal > ディレクティブが使えます。
274+ このディレクティブは Apache 2.4.4 以降で使用できます。
275+ </simpara >
276+
277+ <simpara >
278+ <literal >SetHandler</literal > ディレクティブはファイルが存在するかどうかにかかわらず適用され、
279+ <literal >FallbackResource</literal > はハンドラがまだ設定されていない場合にのみ適用されます。
280+ そのため、ファイルが存在する場合にのみハンドラが適用されるようにするには、
281+ <literal >If</literal > ディレクティブを使う必要があるかもしれません。
282+ こうすることで、<literal >.php</literal > で終わるものの、実際にはファイルが存在しないパスを
283+ <literal >FallbackResource</literal > で処理できるようになります。これは、エラー処理やルーティングに便利でしょう。
284+ </simpara >
285+
286+ <informalexample >
287+ <programlisting role =" apache-conf" >
288+ <![CDATA[
289+ <FilesMatch "\.php$">
290+ <If "-f %{REQUEST_FILENAME}">
291+ SetHandler application/x-httpd-php
292+ </If>
293+ </FilesMatch>
294+ FallbackResource /index.php
295+ ]]>
296+ </programlisting >
297+ </informalexample >
298+
271299 <para >
272300 <literal >mod_rewrite</literal > を使うと、<literal >.php</literal > ファイルに名前を変えたりコピーしたりしなくても
273301 任意の <literal >.phps</literal > ファイルを構文ハイライトつきのソースコードとして表示させることができます。
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" utf-8" ?>
22<!-- $Revision$ -->
3- <!-- EN-Revision: 2dbf3d9064d4cb07f0a2f7d06641c877a2e5ed24 Maintainer: mumumu Status: ready -->
3+ <!-- EN-Revision: 838c897fc7d0c50689a748ae4a59baebfe99920b Maintainer: mumumu Status: ready -->
44<chapter xml : id =" install.windows" xmlns =" http://docbook.org/ns/docbook" xmlns : xlink =" http://www.w3.org/1999/xlink" >
55 <title >Windows システムへのインストール</title >
66
2828 &install.windows.manual;
2929 &install.windows.apache2;
3030 &install.windows.iis;
31- &install.windows.tools;
3231 &install.windows.building;
3332 &install.windows.commandline;
3433</chapter >
Load diff This file was deleted.
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" utf-8" ?>
22<!-- $Revision$ -->
3- <!-- EN-Revision: cdc9d28d334bbc08386fecf8aade66080004a9dd Maintainer: takagi Status: ready -->
3+ <!-- EN-Revision: d149b6ddca64beb9de38cbd4bfd8d19d3bd0b60e Maintainer: takagi Status: ready -->
44<!-- Credits: mumumu -->
55
66<sect1 xml : id =" control-structures.switch" xmlns =" http://docbook.org/ns/docbook" xmlns : xlink =" http://www.w3.org/1999/xlink" >
@@ -293,8 +293,32 @@ switch($beer)
293293]]>
294294 </programlisting >
295295 </informalexample >
296+ &warn.deprecated.feature-8-5-0;
296297 </para >
297298
299+
300+ <sect2 role =" changelog" >
301+ &reftitle.changelog;
302+ <informaltable >
303+ <tgroup cols =" 2" >
304+ <thead >
305+ <row >
306+ <entry >&Version; </entry >
307+ <entry >&Description; </entry >
308+ </row >
309+ </thead >
310+ <tbody >
311+ <row >
312+ <entry >8.5.0</entry >
313+ <entry >
314+ <literal >case</literal > のあとにセミコロンを使う別の構文は、非推奨になりました。
315+ </entry >
316+ </row >
317+ </tbody >
318+ </tgroup >
319+ </informaltable >
320+ </sect2 >
321+
298322 <sect2 role =" seealso" >
299323 &reftitle.seealso;
300324 <para >
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" utf-8" ?>
22<!-- $Revision$ -->
3- <!-- EN-Revision: 2946c8a267734a9e8696e1764f7436e6caa8909c Maintainer: takagi Status: ready -->
3+ <!-- EN-Revision: 6043cd25418a3c45c64a4af118ee939c1835251b Maintainer: takagi Status: ready -->
44<!-- CREDITS: hirokawa,mumumu -->
55<chapter xml : id =" language.operators" xmlns =" http://docbook.org/ns/docbook" annotations =" interactive" >
66 <title >演算子</title >
2929 の欄にあります。この節では演算子の優先順位と結合性について説明します。
3030 複数の演算子を組み合わせたときにどう評価されるのかは、優先順位と結合性で決まります。
3131 </para >
32+ <simpara >
33+ オブジェクトに対して一部の演算子をオーバーロードできる PECL 拡張モジュールがあります。
34+ 詳細は <link linkend =" book.operator" >オブジェクトの演算子オーバーロード</link >
35+ の節を参照ください。
36+ </simpara >
3237
3338 &language.operators.precedence;
3439 &language.operators.arithmetic;
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" utf-8" ?>
22<!-- $Revision$ -->
3- <!-- EN-Revision: 30bda33771e1c8fa8fc8a5ee7559fd7fa189caa0 Maintainer: KentarouTakeda Status: ready -->
3+ <!-- EN-Revision: e7f89579e2abcecad5a62dd96f11a4926df62e13 Maintainer: KentarouTakeda Status: ready -->
44<reference xml : id =" class.nodiscard" role =" class" xmlns =" http://docbook.org/ns/docbook" xmlns : xlink =" http://www.w3.org/1999/xlink" xmlns : xi =" http://www.w3.org/2001/XInclude" >
55 <title >NoDiscard アトリビュート</title >
66 <titleabbrev >NoDiscard</titleabbrev >
2929 警告を抑制するには、<code >$_</code > のような変数を使うことを検討してください。
3030 </simpara >
3131 </note >
32+ <note >
33+ <simpara >
34+ <code >#[\NoDiscard]</code > は、このアトリビュートが記述された個々の関数やメソッドの宣言にのみ適用されます。
35+ 警告が発生するかどうかは、実際に呼び出された関数やメソッドの宣言によって決まります。
36+ そのため、インターフェイスのメソッドや抽象メソッドに <code >#[\NoDiscard]</code >
37+ を追加しても、警告は発生しません。呼び出されるのは、それを実装またはオーバーライドしたメソッドだからです。
38+ 同様に、<code >#[\NoDiscard]</code > が付いたメソッドをオーバーライドした場合、
39+ オーバーライドする側のメソッドにアトリビュートを付けない限り、警告は発生しません。
40+ 一方、トレイトからインポートされたメソッドはアトリビュートを保持します。
41+ トレイトのメソッドは、トレイトを使うクラスに、そのクラスで宣言されたかのようにコピーされるからです。
42+ </simpara >
43+ </note >
3244 </section >
3345
3446 <section xml : id =" nodiscard.synopsis" >
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" utf-8" ?>
22<!-- $Revision$ -->
3- <!-- EN-Revision: 09c49da6f0167fcdfe53a76e3ea28ecfc0eb337b Maintainer: iwamot Status: ready -->
3+ <!-- EN-Revision: e565d17dc87b0c5946ea603fbcfb1777316fb6fc Maintainer: iwamot Status: ready -->
44<refentry xml : id =" error.getprevious" xmlns =" http://docbook.org/ns/docbook" xmlns : xlink =" http://www.w3.org/1999/xlink" >
55 <refnamediv >
66 <refname >Error::getPrevious</refname >
@@ -46,7 +46,7 @@ class MyCustomError extends Error {}
4646
4747function doStuff() {
4848 try {
49- throw new InvalidArgumentError ("You are doing it wrong!", 112);
49+ throw new TypeError ("You are doing it wrong!", 112);
5050 } catch(Error $e) {
5151 throw new MyCustomError("Something happened", 911, $e);
5252 }
6767 <screen >
6868<![CDATA[
6969/home/bjori/ex.php:8 Something happened (911) [MyCustomError]
70- /home/bjori/ex.php:6 You are doing it wrong! (112) [InvalidArgumentError ]
70+ /home/bjori/ex.php:6 You are doing it wrong! (112) [TypeError ]
7171]]>
7272 </screen >
7373 </example >
You can’t perform that action at this time.
0 commit comments