svn: /phpdoc/doc-base/trunk/scripts/docgen/ docgen.php

From: Date: Wed, 29 Feb 2012 00:31:28 +0000
Subject: svn: /phpdoc/doc-base/trunk/scripts/docgen/ docgen.php
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-9709@lists.php.net to get a copy of this message
vrana Wed, 29 Feb 2012 00:31:28 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=323644 Log: Fill PHP_INI_* in Docgen Changed paths: U phpdoc/doc-base/trunk/scripts/docgen/docgen.php Modified: phpdoc/doc-base/trunk/scripts/docgen/docgen.php =================================================================== --- phpdoc/doc-base/trunk/scripts/docgen/docgen.php 2012-02-29 00:31:19 UTC (rev 323643) +++ phpdoc/doc-base/trunk/scripts/docgen/docgen.php 2012-02-29 00:31:28 UTC (rev 323644) @@ -580,6 +580,17 @@ switch ($xml_file) { case 'ini.xml': if ($ini = $obj->getINIEntries()) { + + // ReflectionExtension doesn't provide API for INI visibility but it exports this information to a string + $visibility = array(); + if (preg_match('~\n - INI \{(.*)\n }~sU', (string) $obj, $match)) { + preg_match_all('~\n Entry \[ (\S+) <(.+)> \]\n~', $match[1], $matches, PREG_SET_ORDER); + foreach ($matches as $match) { + list(, $config, $visible) = $match; + $visibility[$config] = "PHP_INI_" . str_replace(",", "|PHP_INI_", $visible); + } + } + $ident = get_ident_size('INI_ENTRIES', $content); $markup = "<tbody>". PHP_EOL; @@ -589,7 +600,7 @@ $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 ."</entry>". PHP_EOL; - $markup .= str_repeat(' ', $ident + 2) ."<entry>its PHP_INI_* value</entry>". PHP_EOL; + $markup .= str_repeat(' ', $ident + 2) ."<entry>" . (isset($visibility[$config]) ? $visibility[$config] : "its PHP_INI_* value") . "</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;

« previous php.doc.cvs (#9709) next »