From 57ceb42b4982cbb6a1d8dcfe603efd65b6d24787 Mon Sep 17 00:00:00 2001 From: Gina Peter Banyard Date: Mon, 11 Nov 2024 14:43:11 +0000 Subject: [PATCH 01/16] PHP 8.4: Add ReflectionConstant stubs --- reference/reflection/book.xml | 1 + reference/reflection/reflectionconstant.xml | 95 ++++++++++++++ .../reflectionconstant/construct.xml | 124 ++++++++++++++++++ .../reflectionconstant/getextension.xml | 122 +++++++++++++++++ .../reflectionconstant/getextensionname.xml | 122 +++++++++++++++++ .../reflectionconstant/getfilename.xml | 122 +++++++++++++++++ .../reflection/reflectionconstant/getname.xml | 122 +++++++++++++++++ .../reflectionconstant/getnamespacename.xml | 122 +++++++++++++++++ .../reflectionconstant/getshortname.xml | 122 +++++++++++++++++ .../reflectionconstant/getvalue.xml | 122 +++++++++++++++++ .../reflectionconstant/isdeprecated.xml | 122 +++++++++++++++++ .../reflectionconstant/tostring.xml | 122 +++++++++++++++++ reference/reflection/versions.xml | 12 ++ 13 files changed, 1330 insertions(+) create mode 100644 reference/reflection/reflectionconstant.xml create mode 100644 reference/reflection/reflectionconstant/construct.xml create mode 100644 reference/reflection/reflectionconstant/getextension.xml create mode 100644 reference/reflection/reflectionconstant/getextensionname.xml create mode 100644 reference/reflection/reflectionconstant/getfilename.xml create mode 100644 reference/reflection/reflectionconstant/getname.xml create mode 100644 reference/reflection/reflectionconstant/getnamespacename.xml create mode 100644 reference/reflection/reflectionconstant/getshortname.xml create mode 100644 reference/reflection/reflectionconstant/getvalue.xml create mode 100644 reference/reflection/reflectionconstant/isdeprecated.xml create mode 100644 reference/reflection/reflectionconstant/tostring.xml diff --git a/reference/reflection/book.xml b/reference/reflection/book.xml index bd371343a58a..859b14788231 100644 --- a/reference/reflection/book.xml +++ b/reference/reflection/book.xml @@ -28,6 +28,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 000000000000..70b7e1f43927 --- /dev/null +++ b/reference/reflection/reflectionconstant.xml @@ -0,0 +1,95 @@ + + + The ReflectionConstant class + ReflectionConstant + + + +
+ &reftitle.intro; + + The ReflectionConstant class reports + information about a global constant. + +
+ + +
+ &reftitle.classsynopsis; + + + + final + ReflectionConstant + + + + implements + Reflector + + + &Properties; + + public + string + name + + + &Methods; + + + + + + + + +
+ +
+ &reftitle.properties; + + + name + + + Name of the constant. Read-only, throws + ReflectionException in attempt to write. + + + + +
+ +
+ &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 000000000000..472263642bf3 --- /dev/null +++ b/reference/reflection/reflectionconstant/construct.xml @@ -0,0 +1,124 @@ + + + + ReflectionConstant::__construct + Description + + + + &reftitle.description; + + public ReflectionConstant::__construct + stringname + + &warn.undocumented.func; + + Description. + + + + + &reftitle.parameters; + + + name + + + Description. + + + + + + + + &reftitle.errors; + + When does this function issue E_* level errors, + and/or throw Exceptions. + + + + + &reftitle.changelog; + + + + + &Version; + &Description; + + + + + 8.X.0 + + Description + + + + + + + + + &reftitle.examples; + + <methodname>ReflectionConstant::__construct</methodname> example + + Description. + + + +]]> + + &example.outputs; + + + + + + + + &reftitle.notes; + + + Any notes that don't fit anywhere else should go here. + + + + + + &reftitle.seealso; + + ClassName::otherMethodName + some_function + + + + + diff --git a/reference/reflection/reflectionconstant/getextension.xml b/reference/reflection/reflectionconstant/getextension.xml new file mode 100644 index 000000000000..06cb15a246b5 --- /dev/null +++ b/reference/reflection/reflectionconstant/getextension.xml @@ -0,0 +1,122 @@ + + + + ReflectionConstant::getExtension + Description + + + + &reftitle.description; + + public ReflectionExtensionnullReflectionConstant::getExtension + + + &warn.undocumented.func; + + Description. + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + Description. + + + + + &reftitle.errors; + + When does this function issue E_* level errors, + and/or throw Exceptions. + + + + + &reftitle.changelog; + + + + + &Version; + &Description; + + + + + 8.X.0 + + Description + + + + + + + + + &reftitle.examples; + + <methodname>ReflectionConstant::getExtension</methodname> example + + Description. + + + +]]> + + &example.outputs; + + + + + + + + &reftitle.notes; + + + Any notes that don't fit anywhere else should go here. + + + + + + &reftitle.seealso; + + ClassName::otherMethodName + some_function + + + + + diff --git a/reference/reflection/reflectionconstant/getextensionname.xml b/reference/reflection/reflectionconstant/getextensionname.xml new file mode 100644 index 000000000000..6e5a5d2540b0 --- /dev/null +++ b/reference/reflection/reflectionconstant/getextensionname.xml @@ -0,0 +1,122 @@ + + + + ReflectionConstant::getExtensionName + Description + + + + &reftitle.description; + + public stringfalseReflectionConstant::getExtensionName + + + &warn.undocumented.func; + + Description. + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + Description. + + + + + &reftitle.errors; + + When does this function issue E_* level errors, + and/or throw Exceptions. + + + + + &reftitle.changelog; + + + + + &Version; + &Description; + + + + + 8.X.0 + + Description + + + + + + + + + &reftitle.examples; + + <methodname>ReflectionConstant::getExtensionName</methodname> example + + Description. + + + +]]> + + &example.outputs; + + + + + + + + &reftitle.notes; + + + Any notes that don't fit anywhere else should go here. + + + + + + &reftitle.seealso; + + ClassName::otherMethodName + some_function + + + + + diff --git a/reference/reflection/reflectionconstant/getfilename.xml b/reference/reflection/reflectionconstant/getfilename.xml new file mode 100644 index 000000000000..89feaefa34db --- /dev/null +++ b/reference/reflection/reflectionconstant/getfilename.xml @@ -0,0 +1,122 @@ + + + + ReflectionConstant::getFileName + Description + + + + &reftitle.description; + + public stringfalseReflectionConstant::getFileName + + + &warn.undocumented.func; + + Description. + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + Description. + + + + + &reftitle.errors; + + When does this function issue E_* level errors, + and/or throw Exceptions. + + + + + &reftitle.changelog; + + + + + &Version; + &Description; + + + + + 8.X.0 + + Description + + + + + + + + + &reftitle.examples; + + <methodname>ReflectionConstant::getFileName</methodname> example + + Description. + + + +]]> + + &example.outputs; + + + + + + + + &reftitle.notes; + + + Any notes that don't fit anywhere else should go here. + + + + + + &reftitle.seealso; + + ClassName::otherMethodName + some_function + + + + + diff --git a/reference/reflection/reflectionconstant/getname.xml b/reference/reflection/reflectionconstant/getname.xml new file mode 100644 index 000000000000..27677b11b309 --- /dev/null +++ b/reference/reflection/reflectionconstant/getname.xml @@ -0,0 +1,122 @@ + + + + ReflectionConstant::getName + Description + + + + &reftitle.description; + + public stringReflectionConstant::getName + + + &warn.undocumented.func; + + Description. + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + Description. + + + + + &reftitle.errors; + + When does this function issue E_* level errors, + and/or throw Exceptions. + + + + + &reftitle.changelog; + + + + + &Version; + &Description; + + + + + 8.X.0 + + Description + + + + + + + + + &reftitle.examples; + + <methodname>ReflectionConstant::getName</methodname> example + + Description. + + + +]]> + + &example.outputs; + + + + + + + + &reftitle.notes; + + + Any notes that don't fit anywhere else should go here. + + + + + + &reftitle.seealso; + + ClassName::otherMethodName + some_function + + + + + diff --git a/reference/reflection/reflectionconstant/getnamespacename.xml b/reference/reflection/reflectionconstant/getnamespacename.xml new file mode 100644 index 000000000000..32cd2c9bedf7 --- /dev/null +++ b/reference/reflection/reflectionconstant/getnamespacename.xml @@ -0,0 +1,122 @@ + + + + ReflectionConstant::getNamespaceName + Description + + + + &reftitle.description; + + public stringReflectionConstant::getNamespaceName + + + &warn.undocumented.func; + + Description. + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + Description. + + + + + &reftitle.errors; + + When does this function issue E_* level errors, + and/or throw Exceptions. + + + + + &reftitle.changelog; + + + + + &Version; + &Description; + + + + + 8.X.0 + + Description + + + + + + + + + &reftitle.examples; + + <methodname>ReflectionConstant::getNamespaceName</methodname> example + + Description. + + + +]]> + + &example.outputs; + + + + + + + + &reftitle.notes; + + + Any notes that don't fit anywhere else should go here. + + + + + + &reftitle.seealso; + + ClassName::otherMethodName + some_function + + + + + diff --git a/reference/reflection/reflectionconstant/getshortname.xml b/reference/reflection/reflectionconstant/getshortname.xml new file mode 100644 index 000000000000..63b5c2919b3c --- /dev/null +++ b/reference/reflection/reflectionconstant/getshortname.xml @@ -0,0 +1,122 @@ + + + + ReflectionConstant::getShortName + Description + + + + &reftitle.description; + + public stringReflectionConstant::getShortName + + + &warn.undocumented.func; + + Description. + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + Description. + + + + + &reftitle.errors; + + When does this function issue E_* level errors, + and/or throw Exceptions. + + + + + &reftitle.changelog; + + + + + &Version; + &Description; + + + + + 8.X.0 + + Description + + + + + + + + + &reftitle.examples; + + <methodname>ReflectionConstant::getShortName</methodname> example + + Description. + + + +]]> + + &example.outputs; + + + + + + + + &reftitle.notes; + + + Any notes that don't fit anywhere else should go here. + + + + + + &reftitle.seealso; + + ClassName::otherMethodName + some_function + + + + + diff --git a/reference/reflection/reflectionconstant/getvalue.xml b/reference/reflection/reflectionconstant/getvalue.xml new file mode 100644 index 000000000000..857b446c699d --- /dev/null +++ b/reference/reflection/reflectionconstant/getvalue.xml @@ -0,0 +1,122 @@ + + + + ReflectionConstant::getValue + Description + + + + &reftitle.description; + + public mixedReflectionConstant::getValue + + + &warn.undocumented.func; + + Description. + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + Description. + + + + + &reftitle.errors; + + When does this function issue E_* level errors, + and/or throw Exceptions. + + + + + &reftitle.changelog; + + + + + &Version; + &Description; + + + + + 8.X.0 + + Description + + + + + + + + + &reftitle.examples; + + <methodname>ReflectionConstant::getValue</methodname> example + + Description. + + + +]]> + + &example.outputs; + + + + + + + + &reftitle.notes; + + + Any notes that don't fit anywhere else should go here. + + + + + + &reftitle.seealso; + + ClassName::otherMethodName + some_function + + + + + diff --git a/reference/reflection/reflectionconstant/isdeprecated.xml b/reference/reflection/reflectionconstant/isdeprecated.xml new file mode 100644 index 000000000000..750124052389 --- /dev/null +++ b/reference/reflection/reflectionconstant/isdeprecated.xml @@ -0,0 +1,122 @@ + + + + ReflectionConstant::isDeprecated + Description + + + + &reftitle.description; + + public boolReflectionConstant::isDeprecated + + + &warn.undocumented.func; + + Description. + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + &return.success; + + + + + &reftitle.errors; + + When does this function issue E_* level errors, + and/or throw Exceptions. + + + + + &reftitle.changelog; + + + + + &Version; + &Description; + + + + + 8.X.0 + + Description + + + + + + + + + &reftitle.examples; + + <methodname>ReflectionConstant::isDeprecated</methodname> example + + Description. + + + +]]> + + &example.outputs; + + + + + + + + &reftitle.notes; + + + Any notes that don't fit anywhere else should go here. + + + + + + &reftitle.seealso; + + ClassName::otherMethodName + some_function + + + + + diff --git a/reference/reflection/reflectionconstant/tostring.xml b/reference/reflection/reflectionconstant/tostring.xml new file mode 100644 index 000000000000..1786e2f4b209 --- /dev/null +++ b/reference/reflection/reflectionconstant/tostring.xml @@ -0,0 +1,122 @@ + + + + ReflectionConstant::__toString + Description + + + + &reftitle.description; + + public stringReflectionConstant::__toString + + + &warn.undocumented.func; + + Description. + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + Description. + + + + + &reftitle.errors; + + When does this function issue E_* level errors, + and/or throw Exceptions. + + + + + &reftitle.changelog; + + + + + &Version; + &Description; + + + + + 8.X.0 + + Description + + + + + + + + + &reftitle.examples; + + <methodname>ReflectionConstant::__toString</methodname> example + + Description. + + + +]]> + + &example.outputs; + + + + + + + + &reftitle.notes; + + + Any notes that don't fit anywhere else should go here. + + + + + + &reftitle.seealso; + + ClassName::otherMethodName + some_function + + + + + diff --git a/reference/reflection/versions.xml b/reference/reflection/versions.xml index fc4b5fe39158..992952dea0dc 100644 --- a/reference/reflection/versions.xml +++ b/reference/reflection/versions.xml @@ -292,6 +292,18 @@ + + + + + + + + + + + + From fe9c4d85c1be0f4ef6c965844e87b91beb645dd0 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Mon, 2 Dec 2024 17:14:42 +0100 Subject: [PATCH 02/16] Fix version for ReflectionConstant::getFilename() This is also 8.5 only --- reference/reflection/versions.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reference/reflection/versions.xml b/reference/reflection/versions.xml index 992952dea0dc..ac4a417018d5 100644 --- a/reference/reflection/versions.xml +++ b/reference/reflection/versions.xml @@ -297,7 +297,7 @@ - + From c2baae5a9c01041bd95cad9224dc47d349cc9044 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Mon, 2 Dec 2024 17:50:33 +0100 Subject: [PATCH 03/16] Document ReflectionConstant::__construct() --- .../reflectionconstant/construct.xml | 69 ++----------------- 1 file changed, 7 insertions(+), 62 deletions(-) diff --git a/reference/reflection/reflectionconstant/construct.xml b/reference/reflection/reflectionconstant/construct.xml index 472263642bf3..18947f0faffb 100644 --- a/reference/reflection/reflectionconstant/construct.xml +++ b/reference/reflection/reflectionconstant/construct.xml @@ -1,8 +1,9 @@ + ReflectionConstant::__construct - Description + Constructs a ReflectionConstant @@ -11,9 +12,8 @@ public ReflectionConstant::__construct stringname - &warn.undocumented.func; - Description. + Constructs a new ReflectionConstant object. @@ -24,7 +24,7 @@ name - Description. + The name of the constant. @@ -34,70 +34,15 @@ &reftitle.errors; - When does this function issue E_* level errors, - and/or throw Exceptions. + Throws a ReflectionException in case the given + constant does not exist. - - &reftitle.changelog; - - - - - &Version; - &Description; - - - - - 8.X.0 - - Description - - - - - - - - - &reftitle.examples; - - <methodname>ReflectionConstant::__construct</methodname> example - - Description. - - - -]]> - - &example.outputs; - - - - - - - - &reftitle.notes; - - - Any notes that don't fit anywhere else should go here. - - - - &reftitle.seealso; - ClassName::otherMethodName - some_function + Constructors From 7d9775fc08728c023ba16d082ee4f33412d06d48 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Mon, 2 Dec 2024 18:08:47 +0100 Subject: [PATCH 04/16] Document ReflectionConstant::getExtension() --- .../reflectionconstant/getextension.xml | 68 +++++-------------- 1 file changed, 16 insertions(+), 52 deletions(-) diff --git a/reference/reflection/reflectionconstant/getextension.xml b/reference/reflection/reflectionconstant/getextension.xml index 06cb15a246b5..f48610bdc5cb 100644 --- a/reference/reflection/reflectionconstant/getextension.xml +++ b/reference/reflection/reflectionconstant/getextension.xml @@ -1,8 +1,9 @@ + ReflectionConstant::getExtension - Description + Gets a ReflectionExtension object for the extension which defined the constant @@ -11,9 +12,9 @@ public ReflectionExtensionnullReflectionConstant::getExtension - &warn.undocumented.func; - Description. + Gets a ReflectionExtension object for the extension + which defined the constant. @@ -25,77 +26,40 @@ &reftitle.returnvalues; - Description. + A ReflectionExtension object representing the + extension which defined the constant, or &null; for user-defined constants. - - &reftitle.errors; - - When does this function issue E_* level errors, - and/or throw Exceptions. - - - - - &reftitle.changelog; - - - - - &Version; - &Description; - - - - - 8.X.0 - - Description - - - - - - - &reftitle.examples; - - <methodname>ReflectionConstant::getExtension</methodname> example - - Description. - + + Basic usage of <methodname>ReflectionConstant::getExtension</methodname> getExtension(); +var_dump($extension); ?> ]]> &example.outputs; + string(7) "sqlite3" +} ]]> - - &reftitle.notes; - - - Any notes that don't fit anywhere else should go here. - - - - &reftitle.seealso; - ClassName::otherMethodName - some_function + ReflectionConstant::getExtensionName From 34c8e2aa8a06ef218799a47d28a541dc240bde3f Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Mon, 2 Dec 2024 22:10:42 +0100 Subject: [PATCH 05/16] Document ReflectionConstant::getExtensionName() --- .../reflectionconstant/getextensionname.xml | 63 ++++--------------- 1 file changed, 11 insertions(+), 52 deletions(-) diff --git a/reference/reflection/reflectionconstant/getextensionname.xml b/reference/reflection/reflectionconstant/getextensionname.xml index 6e5a5d2540b0..235a973a002d 100644 --- a/reference/reflection/reflectionconstant/getextensionname.xml +++ b/reference/reflection/reflectionconstant/getextensionname.xml @@ -1,8 +1,9 @@ + ReflectionConstant::getExtensionName - Description + Gets the name of the extension which defined the constant @@ -11,9 +12,8 @@ public stringfalseReflectionConstant::getExtensionName - &warn.undocumented.func; - Description. + Gets the name of the extension which defined the constant. @@ -25,77 +25,36 @@ &reftitle.returnvalues; - Description. + The name of the extension which defined the constant, or &false; for user-defined constants. - - &reftitle.errors; - - When does this function issue E_* level errors, - and/or throw Exceptions. - - - - - &reftitle.changelog; - - - - - &Version; - &Description; - - - - - 8.X.0 - - Description - - - - - - - &reftitle.examples; - - <methodname>ReflectionConstant::getExtensionName</methodname> example - - Description. - + + Basic usage of <methodname>ReflectionConstant::getExtensionName</methodname> getExtensionName(); +var_dump($extension); ?> ]]> &example.outputs; - - &reftitle.notes; - - - Any notes that don't fit anywhere else should go here. - - - - &reftitle.seealso; - ClassName::otherMethodName - some_function + ReflectionConstant::getExtension From 078e296fe7ba4745fac03e54fac45d557c217a79 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Mon, 2 Dec 2024 22:18:49 +0100 Subject: [PATCH 06/16] Document ReflectionConstant::getFileName() --- .../reflectionconstant/getfilename.xml | 81 ++----------------- 1 file changed, 7 insertions(+), 74 deletions(-) diff --git a/reference/reflection/reflectionconstant/getfilename.xml b/reference/reflection/reflectionconstant/getfilename.xml index 89feaefa34db..2462c6477674 100644 --- a/reference/reflection/reflectionconstant/getfilename.xml +++ b/reference/reflection/reflectionconstant/getfilename.xml @@ -1,8 +1,9 @@ + ReflectionConstant::getFileName - Description + Gets the filename of the file in which the constant has been defined @@ -11,10 +12,10 @@ public stringfalseReflectionConstant::getFileName - &warn.undocumented.func; - Description. + Gets the filename of the file in which the constant has been defined. + @@ -25,80 +26,12 @@ &reftitle.returnvalues; - Description. + Returns the filename of the file in which the constant has been defined. If + the constant is defined in the PHP core or in a PHP extension, &false; is + returned. - - &reftitle.errors; - - When does this function issue E_* level errors, - and/or throw Exceptions. - - - - - &reftitle.changelog; - - - - - &Version; - &Description; - - - - - 8.X.0 - - Description - - - - - - - - - &reftitle.examples; - - <methodname>ReflectionConstant::getFileName</methodname> example - - Description. - - - -]]> - - &example.outputs; - - - - - - - - &reftitle.notes; - - - Any notes that don't fit anywhere else should go here. - - - - - - &reftitle.seealso; - - ClassName::otherMethodName - some_function - - - ReflectionConstant::getName - Description + Gets the name of the constant @@ -11,9 +12,8 @@ public stringReflectionConstant::getName - &warn.undocumented.func; - Description. + Gets the name of the constant, which is composed of its namespace and name. @@ -25,77 +25,38 @@ &reftitle.returnvalues; - Description. + The constants name. - - &reftitle.errors; - - When does this function issue E_* level errors, - and/or throw Exceptions. - - - - - &reftitle.changelog; - - - - - &Version; - &Description; - - - - - 8.X.0 - - Description - - - - - - - &reftitle.examples; - + <methodname>ReflectionConstant::getName</methodname> example - - Description. - getName(); ?> ]]> &example.outputs; - - &reftitle.notes; - - - Any notes that don't fit anywhere else should go here. - - - - &reftitle.seealso; - ClassName::otherMethodName - some_function + ReflectionConstant::getNamespaceName From 775cb6778525bf7952eaebb6ecf0fcd79444d5da Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Mon, 2 Dec 2024 22:44:08 +0100 Subject: [PATCH 08/16] Document ReflectionConstant::getNamespaceName() --- .../reflectionconstant/getnamespacename.xml | 72 ++++--------------- 1 file changed, 15 insertions(+), 57 deletions(-) diff --git a/reference/reflection/reflectionconstant/getnamespacename.xml b/reference/reflection/reflectionconstant/getnamespacename.xml index 32cd2c9bedf7..aaefa40f865d 100644 --- a/reference/reflection/reflectionconstant/getnamespacename.xml +++ b/reference/reflection/reflectionconstant/getnamespacename.xml @@ -2,7 +2,7 @@ ReflectionConstant::getNamespaceName - Description + Gets namespace name @@ -11,9 +11,8 @@ public stringReflectionConstant::getNamespaceName - &warn.undocumented.func; - Description. + Gets the namespace name of the constant. @@ -25,80 +24,39 @@ &reftitle.returnvalues; - Description. + The namespace name, or an empty string for the global namespace. - - &reftitle.errors; - - When does this function issue E_* level errors, - and/or throw Exceptions. - - - - - &reftitle.changelog; - - - - - &Version; - &Description; - - - - - 8.X.0 - - Description - - - - - - - &reftitle.examples; - + <methodname>ReflectionConstant::getNamespaceName</methodname> example - - Description. - getNamespaceName()); +} + +namespace { + const BAR = 'bar'; + var_dump((new \ReflectionConstant('BAR'))->getNamespaceName()); +} ?> ]]> &example.outputs; - - &reftitle.notes; - - - Any notes that don't fit anywhere else should go here. - - - - - - &reftitle.seealso; - - ClassName::otherMethodName - some_function - - - ReflectionConstant::__construct diff --git a/reference/reflection/reflectionconstant/getextension.xml b/reference/reflection/reflectionconstant/getextension.xml index f48610bdc5cb..fa0cd02fc9a5 100644 --- a/reference/reflection/reflectionconstant/getextension.xml +++ b/reference/reflection/reflectionconstant/getextension.xml @@ -1,5 +1,4 @@ - ReflectionConstant::getExtension diff --git a/reference/reflection/reflectionconstant/getextensionname.xml b/reference/reflection/reflectionconstant/getextensionname.xml index 235a973a002d..56e0151ab5f4 100644 --- a/reference/reflection/reflectionconstant/getextensionname.xml +++ b/reference/reflection/reflectionconstant/getextensionname.xml @@ -1,5 +1,4 @@ - ReflectionConstant::getExtensionName diff --git a/reference/reflection/reflectionconstant/getfilename.xml b/reference/reflection/reflectionconstant/getfilename.xml index 2462c6477674..bc4be77a1329 100644 --- a/reference/reflection/reflectionconstant/getfilename.xml +++ b/reference/reflection/reflectionconstant/getfilename.xml @@ -1,5 +1,4 @@ - ReflectionConstant::getFileName diff --git a/reference/reflection/reflectionconstant/getname.xml b/reference/reflection/reflectionconstant/getname.xml index 72de4f729445..497f2626db1c 100644 --- a/reference/reflection/reflectionconstant/getname.xml +++ b/reference/reflection/reflectionconstant/getname.xml @@ -1,5 +1,4 @@ - ReflectionConstant::getName From 936b8ecdb8f019c1684637e1d9b56b281c6481e6 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Mon, 2 Dec 2024 23:04:26 +0100 Subject: [PATCH 11/16] Document ReflectionConstant::getValue() --- .../reflectionconstant/getvalue.xml | 67 +++---------------- 1 file changed, 9 insertions(+), 58 deletions(-) diff --git a/reference/reflection/reflectionconstant/getvalue.xml b/reference/reflection/reflectionconstant/getvalue.xml index 857b446c699d..43bb3d4d7ac5 100644 --- a/reference/reflection/reflectionconstant/getvalue.xml +++ b/reference/reflection/reflectionconstant/getvalue.xml @@ -2,7 +2,7 @@ ReflectionConstant::getValue - Description + Gets value @@ -11,9 +11,8 @@ public mixedReflectionConstant::getValue - &warn.undocumented.func; - Description. + Gets the value of the constant. @@ -25,80 +24,32 @@ &reftitle.returnvalues; - Description. + The value of the constant. - - &reftitle.errors; - - When does this function issue E_* level errors, - and/or throw Exceptions. - - - - - &reftitle.changelog; - - - - - &Version; - &Description; - - - - - 8.X.0 - - Description - - - - - - - &reftitle.examples; - - <methodname>ReflectionConstant::getValue</methodname> example - - Description. - + + <methodname>ReflectionProperty::getValue</methodname> example getValue()); ?> ]]> &example.outputs; - - &reftitle.notes; - - - Any notes that don't fit anywhere else should go here. - - - - - - &reftitle.seealso; - - ClassName::otherMethodName - some_function - - -
&reftitle.intro; @@ -12,7 +11,6 @@ information about a global constant.
-
&reftitle.classsynopsis; From f94cf7601de300876f15700a41d8d52abd8f3d76 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Tue, 3 Dec 2024 00:30:31 +0100 Subject: [PATCH 15/16] Fixes --- reference/reflection/reflectionconstant.xml | 4 ++-- reference/reflection/reflectionconstant/getextension.xml | 4 +--- reference/reflection/reflectionconstant/getextensionname.xml | 4 +--- reference/reflection/reflectionconstant/getname.xml | 4 ++-- 4 files changed, 6 insertions(+), 10 deletions(-) diff --git a/reference/reflection/reflectionconstant.xml b/reference/reflection/reflectionconstant.xml index cd8a8a2a04e3..d9f3830184f7 100644 --- a/reference/reflection/reflectionconstant.xml +++ b/reference/reflection/reflectionconstant.xml @@ -6,10 +6,10 @@
&reftitle.intro; - + The ReflectionConstant class reports information about a global constant. - +
diff --git a/reference/reflection/reflectionconstant/getextension.xml b/reference/reflection/reflectionconstant/getextension.xml index fa0cd02fc9a5..785b8e8d1117 100644 --- a/reference/reflection/reflectionconstant/getextension.xml +++ b/reference/reflection/reflectionconstant/getextension.xml @@ -37,9 +37,7 @@ getExtension(); -var_dump($extension); +var_dump((new ReflectionConstant('SQLITE3_TEXT'))->getExtension()); ?> ]]> diff --git a/reference/reflection/reflectionconstant/getextensionname.xml b/reference/reflection/reflectionconstant/getextensionname.xml index 56e0151ab5f4..f2ba37aff748 100644 --- a/reference/reflection/reflectionconstant/getextensionname.xml +++ b/reference/reflection/reflectionconstant/getextensionname.xml @@ -35,9 +35,7 @@ getExtensionName(); -var_dump($extension); +var_dump((new ReflectionConstant('SQLITE3_TEXT'))->getExtensionName()); ?> ]]> diff --git a/reference/reflection/reflectionconstant/getname.xml b/reference/reflection/reflectionconstant/getname.xml index 497f2626db1c..7ec73852a28f 100644 --- a/reference/reflection/reflectionconstant/getname.xml +++ b/reference/reflection/reflectionconstant/getname.xml @@ -12,7 +12,7 @@ - Gets the name of the constant, which is composed of its namespace and name. + Gets the name of the constant. @@ -24,7 +24,7 @@ &reftitle.returnvalues; - The constants name. + The constants name, which is composed of its namespace and name. From fb1050d86f7fc5c5846e5dbc9457004536e255a8 Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Tue, 3 Dec 2024 12:37:33 +0100 Subject: [PATCH 16/16] Feedback --- reference/reflection/reflectionconstant/getextension.xml | 2 +- .../reflection/reflectionconstant/getextensionname.xml | 2 +- reference/reflection/reflectionconstant/getfilename.xml | 8 ++++---- reference/reflection/reflectionconstant/getname.xml | 2 +- reference/reflection/reflectionconstant/isdeprecated.xml | 2 +- reference/reflection/reflectionconstant/tostring.xml | 5 +++-- 6 files changed, 11 insertions(+), 10 deletions(-) diff --git a/reference/reflection/reflectionconstant/getextension.xml b/reference/reflection/reflectionconstant/getextension.xml index 785b8e8d1117..e488abadc96f 100644 --- a/reference/reflection/reflectionconstant/getextension.xml +++ b/reference/reflection/reflectionconstant/getextension.xml @@ -2,7 +2,7 @@ ReflectionConstant::getExtension - Gets a ReflectionExtension object for the extension which defined the constant + Gets ReflectionExtension of the defining extension diff --git a/reference/reflection/reflectionconstant/getextensionname.xml b/reference/reflection/reflectionconstant/getextensionname.xml index f2ba37aff748..e875731ff4c0 100644 --- a/reference/reflection/reflectionconstant/getextensionname.xml +++ b/reference/reflection/reflectionconstant/getextensionname.xml @@ -2,7 +2,7 @@ ReflectionConstant::getExtensionName - Gets the name of the extension which defined the constant + Gets name of the defining extension diff --git a/reference/reflection/reflectionconstant/getfilename.xml b/reference/reflection/reflectionconstant/getfilename.xml index bc4be77a1329..15b1625133f3 100644 --- a/reference/reflection/reflectionconstant/getfilename.xml +++ b/reference/reflection/reflectionconstant/getfilename.xml @@ -2,7 +2,7 @@ ReflectionConstant::getFileName - Gets the filename of the file in which the constant has been defined + Gets name of the defining file @@ -25,9 +25,9 @@ &reftitle.returnvalues; - Returns the filename of the file in which the constant has been defined. If - the constant is defined in the PHP core or in a PHP extension, &false; is - returned. + Returns the filename of the file in which the constant has been defined. + If the constant is defined in the PHP core or in a PHP extension, + &false; is returned. diff --git a/reference/reflection/reflectionconstant/getname.xml b/reference/reflection/reflectionconstant/getname.xml index 7ec73852a28f..083c50988864 100644 --- a/reference/reflection/reflectionconstant/getname.xml +++ b/reference/reflection/reflectionconstant/getname.xml @@ -2,7 +2,7 @@ ReflectionConstant::getName - Gets the name of the constant + Gets name diff --git a/reference/reflection/reflectionconstant/isdeprecated.xml b/reference/reflection/reflectionconstant/isdeprecated.xml index 778842ace59e..bb6d328d421d 100644 --- a/reference/reflection/reflectionconstant/isdeprecated.xml +++ b/reference/reflection/reflectionconstant/isdeprecated.xml @@ -43,7 +43,7 @@ var_dump((new ReflectionConstant('E_STRICT'))->isDeprecated()); ?> ]]> - &example.outputs; + &example.outputs.84; ReflectionConstant::__toString - Returns the string representation of the ReflectionConstant object + Returns string representation @@ -12,7 +12,8 @@ - Returns the string representation of the ReflectionConstant object. + Returns the string representation of the + ReflectionConstant object.