[prev in list] [next in list] [prev in thread] [next in thread]
List: php-doc-cvs
Subject: [DOC-CVS] [doc-base] master: Replace PHP_INI_* with INI_* constants (#115)
From: haszi via GitHub <noreply () php ! net>
Date: 2024-01-29 13:28:39
Message-ID: Ob1us6mum3aU0FclUQfId5x8TSqfuhwFFEN88dk0 () main ! php ! net
[Download RAW message or body]
Author: haszi (haszi)
Committer: GitHub (web-flow)
Pusher: Girgias
Date: 2024-01-29T13:14:53Z
Commit: https://github.com/php/doc-base/commit/bad8fbf8cd0dfa7f1130a116aae6ff2e3ab2c780
Raw diff: https://github.com/php/doc-base/commit/bad8fbf8cd0dfa7f1130a116aae6ff2e3ab2c780.diff
Replace PHP_INI_* with INI_* constants (#115)
Co-authored-by: haszi <haszika80@gmail.com>
Changed paths:
M RFC/skeletons/ini.xml
M scripts/docgen/docgen.php
M scripts/genPHP_INI_ENTRY.php
M scripts/mk_ini_set_table.sh
Diff:
diff --git a/RFC/skeletons/ini.xml b/RFC/skeletons/ini.xml
index 9d7a1dce8..354375dcd 100644
--- a/RFC/skeletons/ini.xml
+++ b/RFC/skeletons/ini.xml
@@ -21,13 +21,13 @@
<row>
<entry>theini_option</entry>
<entry>itsvalue</entry>
- <entry>its PHP_INI_* value</entry>
+ <entry>its INI_* value</entry>
<entry>version changes information</entry>
</row>
<row>
<entry>anotherini_option</entry>
<entry>itsvalue</entry>
- <entry>its PHP_INI_* value</entry>
+ <entry>its INI_* value</entry>
<entry></entry>
</row>
</tbody>
@@ -37,9 +37,9 @@
&ini.php.constants;
</para>
-
+
&ini.descriptions.title;
-
+
<para>
<variablelist>
diff --git a/scripts/docgen/docgen.php b/scripts/docgen/docgen.php
index 17e914ced..d8bd41866 100644
--- a/scripts/docgen/docgen.php
+++ b/scripts/docgen/docgen.php
@@ -678,10 +678,10 @@ function gen_extension_markup(ReflectionExtension $obj, \
$content, $xml_file) { / if ($ini = ini_get_all($obj->name)) {
$visibility = array(
- INI_USER => 'PHP_INI_USER',
- INI_PERDIR => 'PHP_INI_PERDIR',
- INI_SYSTEM => 'PHP_INI_SYSTEM',
- INI_ALL => 'PHP_INI_ALL',
+ INI_USER => 'INI_USER',
+ INI_PERDIR => 'INI_PERDIR',
+ INI_SYSTEM => 'INI_SYSTEM',
+ INI_ALL => 'INI_ALL',
);
$ident = get_ident_size('INI_ENTRIES', $content);
@@ -693,7 +693,7 @@ function gen_extension_markup(ReflectionExtension $obj, $content, \
$xml_file) { / $markup .= str_repeat(' ', $ident + 1) ."<row>". PHP_EOL;
$markup .= str_repeat(' ', $ident + 2) ."<entry><link linkend=\"". $id ."\">". \
$config ."</link></entry>". PHP_EOL;
$markup .= str_repeat(' ', $ident + 2) ."<entry>". $value['global_value'] \
."</entry>". PHP_EOL;
- $markup .= str_repeat(' ', $ident + 2) ."<entry>" . \
(isset($visibility[$value['access']]) ? $visibility[$value['access']] : \
$value['access']) . "</entry>". PHP_EOL; + $markup .= str_repeat(' ', $ident + 2) \
."<entry>" . (isset($visibility[$value['access']]) ? ('<constant>' . \
$visibility[$value['access']] . '</constant>') : $value['access']) . "</entry>". \
PHP_EOL;
$markup .= str_repeat(' ', $ident + 2) ."<entry><!-- leave empty, this will be \
filled by an automatic script --></entry>". PHP_EOL; $markup .= str_repeat(' ', \
$ident + 1) ."</row>". PHP_EOL;
diff --git a/scripts/genPHP_INI_ENTRY.php b/scripts/genPHP_INI_ENTRY.php
index 424338739..c5fb33d00 100644
--- a/scripts/genPHP_INI_ENTRY.php
+++ b/scripts/genPHP_INI_ENTRY.php
@@ -67,9 +67,9 @@
$legend = <<<LEGEND
<para>
Read the manual section on <link linkend="configuration">
- Configurations</link> for more information in regards to setting
- PHP configurations. The <literal>PHP_INI_*</literal>
- <link linkend="language.constants">constants</link> used in the
+ Configurations</link> for more information in regards to setting
+ PHP configurations. The <literal>INI_*</literal>
+ <link linkend="language.constants">constants</link> used in the
table below are defined as follows:
</para>
<para>
@@ -83,23 +83,23 @@
</thead>
<tbody>
<row>
- <entry><constant>PHP_INI_USER</constant></entry>
+ <entry><constant>INI_USER</constant></entry>
<entry>1</entry>
<entry>Entry can be set in user scripts</entry>
</row>
<row>
- <entry><constant>PHP_INI_PERDIR</constant></entry>
+ <entry><constant>INI_PERDIR</constant></entry>
<entry>2</entry>
<entry>Entry can be set in <filename>.htaccess</filename></entry>
</row>
<row>
- <entry><constant>PHP_INI_SYSTEM</constant></entry>
+ <entry><constant>INI_SYSTEM</constant></entry>
<entry>4</entry>
<entry>Entry can be set in <filename>php.ini</filename> or
<filename>httpd.conf</filename></entry>
</row>
<row>
- <entry><constant>PHP_INI_ALL</constant></entry>
+ <entry><constant>INI_ALL</constant></entry>
<entry>7</entry>
<entry>Entry can be set anywhere</entry>
</row>
@@ -192,7 +192,7 @@ function findINI($fname) {/*{{{*/
continue;
}
$found['INI'][$entry[1]] = array(
- 'def' => $entry[2],
+ 'def' => $entry[2],
'mod' => str_replace(array(' ', \
"\n","\r","\t"),'',$entry[3]) );
}
@@ -218,7 +218,7 @@ function flatentree($tree, $section) {/*{{{*/
function createINI($dir, $cfgs) {/*{{{*/
global $master_ini_table;
-
+
if (empty($cfgs)) {
return false;
}
@@ -252,7 +252,7 @@ function createINI($dir, $cfgs) {/*{{{*/
$rows .= " </row>\n";
}
$master_ini_table .= $rows;
-
+
if ($dir == 'en/chapters') {
$id = 'general';
} else {
@@ -284,7 +284,7 @@ function createMasterINI ($dir, $rows) {/*{{{*/
fflush($fp);
fclose($fp);
echo "CREATED {$GLOBALS['phpdoc_dir']}/{$dir}/config.master_test.xml\n";
- }
+ }
} /*}}}*/
// Set the PHP4 and the PHPDOC source dirs
diff --git a/scripts/mk_ini_set_table.sh b/scripts/mk_ini_set_table.sh
index d7f1e5f32..41571b516 100755
--- a/scripts/mk_ini_set_table.sh
+++ b/scripts/mk_ini_set_table.sh
@@ -6,18 +6,18 @@
# Author: Jesus M. Castagnetto
# Created: Mon Mar 19 04:57:02 PST 2001
# Updated: Thu Apr 25 11:42:26 PDT 2002
-# - look through all PHP_INI_ containing files
+# - look through all INI_ containing files
# - save table in the new split dir for the function
# Updated: Wed Nov 20 18:16:12 PST 2002
-# - rearrange the order of the tables, put the PHP_INI_* definitions first.
+# - rearrange the order of the tables, put the INI_* definitions first.
-cfiles=`grep -rl PHP_INI_ ../php4/*`
+cfiles=`grep -rl INI_ ../php4/*`
ini_set_table="en/reference/info/functions/ini_set_table";
awk 'BEGIN {
print "<note>";
print " <para>";
- print " The PHP_INI_* constants used in the table below are defined as follows:";
+ print " The INI_* constants used in the table below are defined as follows:";
print " <table>";
print " <thead>";
print " <row>";
@@ -28,23 +28,23 @@ awk 'BEGIN {
print " </thead>";
print " <tbody>";
print " <row>";
- print " <entry>PHP_INI_USER</entry>";
+ print " <entry><constant>INI_USER</constant></entry>";
print " <entry>1</entry>";
print " <entry>Entry can be set in user scripts</entry>";
print " </row>";
print " <row>";
- print " <entry>PHP_INI_PERDIR</entry>";
+ print " <entry><constant>INI_PERDIR</constant></entry>";
print " <entry>2</entry>";
print " <entry>Entry can be set in <filename>.htaccess</filename></entry>";
print " </row>";
print " <row>";
- print " <entry>PHP_INI_SYSTEM</entry>";
+ print " <entry><constant>INI_SYSTEM</constant></entry>";
print " <entry>4</entry>";
print " <entry>Entry can be set in <filename>php.ini</filename> or";
print " <filename>httpd.conf</filename></entry>";
print " </row>";
print " <row>";
- print " <entry>PHP_INI_ALL</entry>";
+ print " <entry><constant>INI_ALL</constant></entry>";
print " <entry>7</entry>";
print " <entry>Entry can be set anywhere</entry>";
print " </row>";
@@ -63,7 +63,7 @@ awk 'BEGIN {
print " </thead>";
print " <tbody>";
}
-$0 ~ /PHP_INI_.*\(/ && $0 !~ /^static/ && $0 !~ /PHP_INI_(BEGIN|END)/ {
+$0 ~ /INI_.*\(/ && $0 !~ /^static/ && $0 !~ /INI_(BEGIN|END)/ {
nf = split($0,tmp,",");
varname = substr(tmp[1], index(tmp[1], "\""));
--
PHP Documentation Commits Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic