diff --git a/reference/reflection/book.xml b/reference/reflection/book.xml index 1c8f444332..accd594130 100644 --- a/reference/reflection/book.xml +++ b/reference/reflection/book.xml @@ -1,5 +1,5 @@ - + @@ -29,6 +29,7 @@ &reference.reflection.reflection; &reference.reflection.reflectionclass; &reference.reflection.reflectionclassconstant; + &reference.reflection.reflectionconstant; &reference.reflection.reflectionenum; &reference.reflection.reflectionenumunitcase; &reference.reflection.reflectionenumbackedcase; diff --git a/reference/reflection/reflectionconstant.xml b/reference/reflection/reflectionconstant.xml new file mode 100644 index 0000000000..04b8133506 --- /dev/null +++ b/reference/reflection/reflectionconstant.xml @@ -0,0 +1,94 @@ + + + + + ReflectionConstant クラス + ReflectionConstant + + +
+ &reftitle.intro; + + ReflectionConstant クラスは、グローバル定数に関する情報を報告します。 + +
+ +
+ &reftitle.classsynopsis; + + + + final + ReflectionConstant + + + + implements + Reflector + + + &Properties; + + public + string + name + + + &Methods; + + + + + + + + +
+ +
+ &reftitle.properties; + + + name + + + 定数の名前。読み取り専用です。 + 書き込もうとすると ReflectionException がスローされます。 + + + + +
+ +
+ &reftitle.seealso; + + ReflectionClassConstant + +
+ +
+ + &reference.reflection.entities.reflectionconstant; + +
+ diff --git a/reference/reflection/reflectionconstant/construct.xml b/reference/reflection/reflectionconstant/construct.xml new file mode 100644 index 0000000000..15db2b1192 --- /dev/null +++ b/reference/reflection/reflectionconstant/construct.xml @@ -0,0 +1,69 @@ + + + + + + ReflectionConstant::__construct + ReflectionConstant を構築する + + + + &reftitle.description; + + public ReflectionConstant::__construct + stringname + + + 新しい ReflectionConstant を構築します。 + + + + + &reftitle.parameters; + + + name + + + 定数の名前。 + + + + + + + + &reftitle.errors; + + 与えられた定数が存在しない場合は、ReflectionException をスローします。 + + + + + &reftitle.seealso; + + Constructors + + + + + diff --git a/reference/reflection/reflectionconstant/getextension.xml b/reference/reflection/reflectionconstant/getextension.xml new file mode 100644 index 0000000000..a04e1d4b0c --- /dev/null +++ b/reference/reflection/reflectionconstant/getextension.xml @@ -0,0 +1,84 @@ + + + + + + ReflectionConstant::getExtension + 定数を定義した拡張モジュールの ReflectionExtension を取得する + + + + &reftitle.description; + + public ReflectionExtensionnullReflectionConstant::getExtension + + + + この定数を定義した拡張モジュールの ReflectionExtension オブジェクトを取得します。 + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + この定数を定義した拡張モジュールを表す ReflectionExtension オブジェクトを返します。 + ユーザーが定義した定数の場合は &null; を返します。 + + + + + &reftitle.examples; + + <methodname>ReflectionConstant::getExtension</methodname> の基本的な使い方 + +getExtension()); +?> +]]> + + &example.outputs; + + + string(7) "sqlite3" +} +]]> + + + + + + &reftitle.seealso; + + ReflectionConstant::getExtensionName + + + + + diff --git a/reference/reflection/reflectionconstant/getextensionname.xml b/reference/reflection/reflectionconstant/getextensionname.xml new file mode 100644 index 0000000000..4b0a1ca490 --- /dev/null +++ b/reference/reflection/reflectionconstant/getextensionname.xml @@ -0,0 +1,80 @@ + + + + + + ReflectionConstant::getExtensionName + 定数を定義した拡張モジュールの名前を取得する + + + + &reftitle.description; + + public stringfalseReflectionConstant::getExtensionName + + + + この定数を定義した拡張モジュールの名前を取得します。 + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + この定数を定義した拡張モジュールの名前を返します。ユーザーが定義した定数の場合は &false; を返します。 + + + + + &reftitle.examples; + + <methodname>ReflectionConstant::getExtensionName</methodname> の基本的な使い方 + +getExtensionName()); +?> +]]> + + &example.outputs; + + + + + + + + &reftitle.seealso; + + ReflectionConstant::getExtension + + + + + diff --git a/reference/reflection/reflectionconstant/getfilename.xml b/reference/reflection/reflectionconstant/getfilename.xml new file mode 100644 index 0000000000..a7f3a33634 --- /dev/null +++ b/reference/reflection/reflectionconstant/getfilename.xml @@ -0,0 +1,56 @@ + + + + + + ReflectionConstant::getFileName + 定数を定義したファイル名を取得する + + + + &reftitle.description; + + public stringfalseReflectionConstant::getFileName + + + + この定数を定義したファイルの名前を取得します。 + + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + この定数を定義したファイルの名前を返します。 + PHP コアや PHP の拡張モジュールによって定義されている場合、 + &false; が返されます。 + + + + + diff --git a/reference/reflection/reflectionconstant/getname.xml b/reference/reflection/reflectionconstant/getname.xml new file mode 100644 index 0000000000..81daed59c0 --- /dev/null +++ b/reference/reflection/reflectionconstant/getname.xml @@ -0,0 +1,84 @@ + + + + + + ReflectionConstant::getName + 定数名を取得する + + + + &reftitle.description; + + public stringReflectionConstant::getName + + + + 定数名を取得します。 + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + 名前空間と名前で構成された定数名を返します。 + + + + + &reftitle.examples; + + <methodname>ReflectionConstant::getName</methodname> の例 + +getName(); +?> +]]> + + &example.outputs; + + + + + + + + &reftitle.seealso; + + ReflectionConstant::getNamespaceName + + + + + diff --git a/reference/reflection/reflectionconstant/getnamespacename.xml b/reference/reflection/reflectionconstant/getnamespacename.xml new file mode 100644 index 0000000000..c582e84c4d --- /dev/null +++ b/reference/reflection/reflectionconstant/getnamespacename.xml @@ -0,0 +1,82 @@ + + + + + + ReflectionConstant::getNamespaceName + 名前空間名を取得する + + + + &reftitle.description; + + public stringReflectionConstant::getNamespaceName + + + + 定数の名前空間名を取得します。 + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + 名前空間名を返します。グローバル名前空間の場合は空文字列を返します。 + + + + + &reftitle.examples; + + <methodname>ReflectionConstant::getNamespaceName</methodname> の例 + +getNamespaceName()); +} + +namespace { + const BAR = 'bar'; + var_dump((new \ReflectionConstant('BAR'))->getNamespaceName()); +} +?> +]]> + + &example.outputs; + + + + + + + + diff --git a/reference/reflection/reflectionconstant/getshortname.xml b/reference/reflection/reflectionconstant/getshortname.xml new file mode 100644 index 0000000000..97cecd9ddd --- /dev/null +++ b/reference/reflection/reflectionconstant/getshortname.xml @@ -0,0 +1,84 @@ + + + + + + ReflectionConstant::getShortName + 短い名前を取得する + + + + &reftitle.description; + + public stringReflectionConstant::getShortName + + + + 名前空間部分を除いた、定数の短い名前を取得します。 + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + 定数の短い名前を返します。 + + + + + &reftitle.examples; + + <methodname>ReflectionConstant::getShortName</methodname> の例 + +getName(); +?> +]]> + + &example.outputs; + + + + + + + + &reftitle.seealso; + + ReflectionConstant::getName + + + + + diff --git a/reference/reflection/reflectionconstant/getvalue.xml b/reference/reflection/reflectionconstant/getvalue.xml new file mode 100644 index 0000000000..6425363393 --- /dev/null +++ b/reference/reflection/reflectionconstant/getvalue.xml @@ -0,0 +1,75 @@ + + + + + + ReflectionConstant::getValue + 値を取得する + + + + &reftitle.description; + + public mixedReflectionConstant::getValue + + + + 定数の値を取得します。 + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + 定数の値を返します。 + + + + + &reftitle.examples; + + <methodname>ReflectionProperty::getValue</methodname> の例 + +getValue()); +?> +]]> + + &example.outputs; + + + + + + + + diff --git a/reference/reflection/reflectionconstant/isdeprecated.xml b/reference/reflection/reflectionconstant/isdeprecated.xml new file mode 100644 index 0000000000..8c6a35e8f0 --- /dev/null +++ b/reference/reflection/reflectionconstant/isdeprecated.xml @@ -0,0 +1,77 @@ + + + + + + ReflectionConstant::isDeprecated + 非推奨かどうかを調べる + + + + &reftitle.description; + + public boolReflectionConstant::isDeprecated + + + + 定数が非推奨かどうかを調べます。 + + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + 定数が非推奨なら &true; を、そうでなければ &false; を返します。 + + + + + &reftitle.examples; + + + <methodname>ReflectionConstant::isDeprecated</methodname> の例 + + +isDeprecated()); +?> +]]> + + &example.outputs.84; + + + + + + + + diff --git a/reference/reflection/reflectionconstant/tostring.xml b/reference/reflection/reflectionconstant/tostring.xml new file mode 100644 index 0000000000..2ca785ab56 --- /dev/null +++ b/reference/reflection/reflectionconstant/tostring.xml @@ -0,0 +1,60 @@ + + + + + + ReflectionConstant::__toString + 文字列表現を返す + + + + &reftitle.description; + + public stringReflectionConstant::__toString + + + + ReflectionConstant オブジェクトの文字列表現を返します。 + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + この ReflectionConstant インスタンスの文字列表現を返します。 + + + + + &reftitle.seealso; + + __toString() + + + + + diff --git a/translation.xml b/translation.xml index 30983a198a..e324970f31 100644 --- a/translation.xml +++ b/translation.xml @@ -32,6 +32,7 @@ +